diff --git a/Makefile b/Makefile index 3d6f658db3a..c319d182a0b 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/convolutional_layer.c b/src/convolutional_layer.c index 4c284842aac..d9aa28396f1 100644 --- a/src/convolutional_layer.c +++ b/src/convolutional_layer.c @@ -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