Skip to content

Commit

Permalink
Fix -Wunused-variable diagnostic when !ULAB_SUPPORTS_COMPLEX (#631)
Browse files Browse the repository at this point in the history
* Fix -Wunused-variable diagnostic when !ULAB_SUPPORTS_COMPLEX

`o_in` is only used in the SUPPORTS_COMPLEX case, so the variable
definition needs to be moved accordingly.

* update version and changelog
  • Loading branch information
jepler committed Jun 28, 2023
1 parent 112d4f8 commit 38caf84
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/numpy/vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,9 @@ mp_obj_t vector_sqrt(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args)
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);

mp_obj_t o_in = args[0].u_obj;

#if ULAB_SUPPORTS_COMPLEX
mp_obj_t o_in = args[0].u_obj;
uint8_t dtype = mp_obj_get_int(args[2].u_obj);
if((dtype != NDARRAY_FLOAT) && (dtype != NDARRAY_COMPLEX)) {
mp_raise_TypeError(translate("dtype must be float, or complex"));
Expand Down
2 changes: 1 addition & 1 deletion code/ulab.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "user/user.h"
#include "utils/utils.h"

#define ULAB_VERSION 6.3.3
#define ULAB_VERSION 6.3.4
#define xstr(s) str(s)
#define str(s) #s

Expand Down
16 changes: 16 additions & 0 deletions docs/ulab-change-log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
Fri, 12 May 2023

version 6.3.4

fix compile error when COMPLEX support not enabled

version 6.3.3

Polyval handles non-array as second argument (#601)

version 6.3.2

fix out of bound read

version 6.3.1

fix integer overflows

version 6.3.0

add bitwise operators
Expand Down

0 comments on commit 38caf84

Please sign in to comment.