From ea7d3754c6158506c8c5b4b5c198cf2a4d1245aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Baptiste=20B=C3=A9drune?= Date: Mon, 17 May 2021 14:55:22 +0200 Subject: [PATCH] Fix compilation waring in eth sdk --- src_common/ethUtils.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src_common/ethUtils.h b/src_common/ethUtils.h index 511d7f1..0c7a242 100644 --- a/src_common/ethUtils.h +++ b/src_common/ethUtils.h @@ -60,9 +60,10 @@ bool adjustDecimals(char *src, uint32_t targetLength, uint8_t decimals); -__attribute__((no_instrument_function)) inline int allzeroes(uint8_t *buf, int n) { - for (int i = 0; i < n; ++i) { - if (buf[i]) { +__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]) { return 0; } } @@ -77,6 +78,6 @@ __attribute__((no_instrument_function)) inline int ismaxint(uint8_t *buf, int n) return 1; } -static const uint8_t const HEXDIGITS[] = "0123456789abcdef"; +static const char HEXDIGITS[] = "0123456789abcdef"; #endif /* _ETHUTILS_H_ */