From d9434a01ade5f33b88dc5f17de83ae98706ec504 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Wed, 6 Mar 2024 16:56:18 +1300 Subject: [PATCH] Suppress clang -Wunused-function warning --- src/useful.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/useful.h b/src/useful.h index 63ec78e1..059636bc 100644 --- a/src/useful.h +++ b/src/useful.h @@ -88,6 +88,9 @@ # define put16(W, FH) BLK(int16_t w = (W); fwrite(&w, 2, 1, (FH));) # define put32(W, FH) BLK(int32_t w = (W); fwrite(&w, 4, 1, (FH));) +# ifdef __GNUC__ +__attribute__((unused)) +# endif static inline int16_t get16(FILE *fh) { int16_t w; if (fread(&w, 2, 1, fh) == 0) { @@ -98,6 +101,9 @@ static inline int16_t get16(FILE *fh) { return w; } +# ifdef __GNUC__ +__attribute__((unused)) +# endif static inline int32_t get32(FILE *fh) { int32_t w; if (fread(&w, 4, 1, fh) == 0) { -- 2.11.4.GIT