Skip to content

Commit 38caf84

Browse files
authored
Fix -Wunused-variable diagnostic when !ULAB_SUPPORTS_COMPLEX (#631)
* 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
1 parent 112d4f8 commit 38caf84

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

code/numpy/vector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,9 @@ mp_obj_t vector_sqrt(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args)
840840
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
841841
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
842842

843-
mp_obj_t o_in = args[0].u_obj;
844843

845844
#if ULAB_SUPPORTS_COMPLEX
845+
mp_obj_t o_in = args[0].u_obj;
846846
uint8_t dtype = mp_obj_get_int(args[2].u_obj);
847847
if((dtype != NDARRAY_FLOAT) && (dtype != NDARRAY_COMPLEX)) {
848848
mp_raise_TypeError(translate("dtype must be float, or complex"));

code/ulab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "user/user.h"
3434
#include "utils/utils.h"
3535

36-
#define ULAB_VERSION 6.3.3
36+
#define ULAB_VERSION 6.3.4
3737
#define xstr(s) str(s)
3838
#define str(s) #s
3939

docs/ulab-change-log.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
Fri, 12 May 2023
22

3+
version 6.3.4
4+
5+
fix compile error when COMPLEX support not enabled
6+
7+
version 6.3.3
8+
9+
Polyval handles non-array as second argument (#601)
10+
11+
version 6.3.2
12+
13+
fix out of bound read
14+
15+
version 6.3.1
16+
17+
fix integer overflows
18+
319
version 6.3.0
420

521
add bitwise operators

0 commit comments

Comments
 (0)