diff options
author | Michael McGeagh <michael.mcgeagh@arm.com> | 2020-12-03 13:53:56 +0000 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-12-07 14:56:13 +0000 |
commit | d5cf7650b6bcfa5d81321661fa300763660d31ab (patch) | |
tree | 0d04503c6a2f43475888168a71c5e64b0071fd2c /ethosu/mlw_codec | |
parent | 6f72526b3c74c0e64075563be2ddf7f9708ad12c (diff) | |
download | ethos-u-vela-d5cf7650b6bcfa5d81321661fa300763660d31ab.tar.gz |
vela: Modify CFLAGS for mlw_codec makefile
Fix signed/unsigned warning
Removed from README.md as it adds no value. The standalone tool is not
expected to be used by customers.
Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Change-Id: I09034478a14c37d30874d5182a096591dfdd6eb2
Diffstat (limited to 'ethosu/mlw_codec')
-rw-r--r-- | ethosu/mlw_codec/makefile | 3 | ||||
-rw-r--r-- | ethosu/mlw_codec/mlw_main.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ethosu/mlw_codec/makefile b/ethosu/mlw_codec/makefile index 68eb0d94..aa214f9b 100644 --- a/ethosu/mlw_codec/makefile +++ b/ethosu/mlw_codec/makefile @@ -20,7 +20,8 @@ UNAME=$(shell uname -o) -CFLAGS=-Wall -Werror -Wno-unused-function -Wno-unused-variable +CFLAGS=-Wall -Werror -Wno-unused-variable +CFLAGS+=-fwrapv -fstack-protector-strong -flto -fuse-linker-plugin -ffat-lto-objects ifeq ($(DEBUG),1) CFLAGS+=-g -O0 -DDEBUG diff --git a/ethosu/mlw_codec/mlw_main.c b/ethosu/mlw_codec/mlw_main.c index 9f720495..315c899d 100644 --- a/ethosu/mlw_codec/mlw_main.c +++ b/ethosu/mlw_codec/mlw_main.c @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) if (!decode) { // Encode - int i, n = int16_format ? inbuf_size/sizeof(int16_t) : inbuf_size; + int i, n = int16_format ? inbuf_size/(int)sizeof(int16_t) : inbuf_size; int16_t *weights = malloc( n * sizeof(int16_t) ); for(i=0; i<n; i++) { weights[i] = int16_format ? ((int16_t*)inbuf)[i] : ((int8_t*)inbuf)[i]; @@ -145,7 +145,7 @@ int main(int argc, char *argv[]) int i, n; int16_t *weights; n = mlw_decode( inbuf, inbuf_size, &weights, verbose); - outbuf_size = int16_format ? n*sizeof(int16_t) : n; + outbuf_size = int16_format ? n*(int)sizeof(int16_t) : n; outbuf = malloc( outbuf_size ); assert(outbuf); for(i=0; i<n; i++) { |