diff --git a/Makefile b/Makefile index 29a4e3c..9111e4e 100755 --- a/Makefile +++ b/Makefile @@ -346,7 +346,7 @@ endif CC := $(CLANGPATH)clang #CFLAGS += -O0 -CFLAGS += -O3 -Os -Wno-format-invalid-specifier -Wno-format-extra-args +CFLAGS += -Oz -Wno-format-invalid-specifier -Wno-format-extra-args AS := $(GCCPATH)arm-none-eabi-gcc diff --git a/src_common/ethUtils.h b/src_common/ethUtils.h index de51b1c..2f66b29 100644 --- a/src_common/ethUtils.h +++ b/src_common/ethUtils.h @@ -63,7 +63,7 @@ bool adjustDecimals(char *src, uint32_t targetLength, uint8_t decimals); -__attribute__((no_instrument_function)) inline int allzeroes(void *buf, size_t n) { +static __attribute__((no_instrument_function)) inline int allzeroes(void *buf, size_t n) { uint8_t *p = (uint8_t *) buf; for (size_t i = 0; i < n; ++i) { if (p[i]) { @@ -72,7 +72,7 @@ __attribute__((no_instrument_function)) inline int allzeroes(void *buf, size_t n } return 1; } -__attribute__((no_instrument_function)) inline int ismaxint(uint8_t *buf, int n) { +static __attribute__((no_instrument_function)) inline int ismaxint(uint8_t *buf, int n) { for (int i = 0; i < n; ++i) { if (buf[i] != 0xff) { return 0; diff --git a/src_common/network.h b/src_common/network.h index 529cc4f..23bffc1 100644 --- a/src_common/network.h +++ b/src_common/network.h @@ -2,9 +2,11 @@ #include "tokens.h" #include "shared_context.h" +#define MAX_NETWORK_TICKER_LEN 8 + typedef struct network_info_s { const char name[NETWORK_STRING_MAX_SIZE]; - const char ticker[MAX_TICKER_LEN]; + const char ticker[MAX_NETWORK_TICKER_LEN]; uint64_t chain_id; } network_info_t;