all repos — mgba @ 8bbac2f512519b5502748e67e4dae8c36b71547c

mGBA Game Boy Advance Emulator

Add __attribute__((unused)) to generated bitfield functions
Jeffrey Pfau jeffrey@endrift.com
Mon, 06 Oct 2014 00:18:53 -0700
commit

8bbac2f512519b5502748e67e4dae8c36b71547c

parent

0c18e415e8fa7973e5e79ad22d9c934786ed833b

1 files changed, 5 insertions(+), 5 deletions(-)

jump to
M src/arm/common.hsrc/arm/common.h

@@ -57,19 +57,19 @@

#define DECL_BITFIELD(NAME, TYPE) typedef TYPE NAME #define DECL_BITS(TYPE, FIELD, START, SIZE) \ - static inline TYPE TYPE ## Is ## FIELD (TYPE src) { \ + __attribute__((unused)) static inline TYPE TYPE ## Is ## FIELD (TYPE src) { \ return CHECK_BITS(src, (START), (START) + (SIZE)); \ } \ - static inline TYPE TYPE ## Get ## FIELD (TYPE src) { \ + __attribute__((unused)) static inline TYPE TYPE ## Get ## FIELD (TYPE src) { \ return EXT_BITS(src, (START), (START) + (SIZE)); \ } \ - static inline TYPE TYPE ## Clear ## FIELD (TYPE src) { \ + __attribute__((unused)) static inline TYPE TYPE ## Clear ## FIELD (TYPE src) { \ return CLEAR_BITS(src, (START), (START) + (SIZE)); \ } \ - static inline TYPE TYPE ## Fill ## FIELD (TYPE src) { \ + __attribute__((unused)) static inline TYPE TYPE ## Fill ## FIELD (TYPE src) { \ return FILL_BITS(src, (START), (START) + (SIZE)); \ } \ - static inline TYPE TYPE ## Set ## FIELD (TYPE src, TYPE bits) { \ + __attribute__((unused)) static inline TYPE TYPE ## Set ## FIELD (TYPE src, TYPE bits) { \ return INS_BITS(src, (START), (START) + (SIZE), bits); \ }