Skip to content

Commit

Permalink
do not use permissive for C++ by adding pointless cast
Browse files Browse the repository at this point in the history
  • Loading branch information
uecker committed Aug 22, 2024
1 parent 211fad5 commit 08bf1bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ CFLAGS=-Wall -Wno-unused-parameter -Wno-unknown-pragmas -fPIC -rdynamic

ifeq ($(USE_CPP), 1)
# C is not C++
CFLAGS+=-fpermissive -Wno-write-strings
CFLAGS+=-Wno-write-strings
else
CFLAGS+=-Wextra
endif
Expand Down
4 changes: 2 additions & 2 deletions src/convolutional_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,8 @@ void binary_align_weights(convolutional_layer *l)

int align_weights_size = new_lda * m;
l->align_bit_weights_size = align_weights_size / 8 + 1;
float* align_weights = xcalloc(align_weights_size, sizeof(float));
l->align_bit_weights = xcalloc(l->align_bit_weights_size, sizeof(char));
float* align_weights = (float*)xcalloc(align_weights_size, sizeof(float));
l->align_bit_weights = (char*)xcalloc(l->align_bit_weights_size, sizeof(char));

int i, j;
// align A without transpose
Expand Down

0 comments on commit 08bf1bb

Please sign in to comment.