disas/arm-a64: Add missing compiler attribute GCC_FMT_ATTR
PATCH 1/1 disas/arm-a64: Add missing compiler attribute GCC_FMT_ATTR
Type fprintf_function which fits here was defined with this attribute.
---
This is an optional trivial patch for 2.4 which fixes compiler warnings in my build environment (with -Wextra).
disas/arm-a64.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
disas/arm-a64.cc +2 -2
@@ -42,7 +42,7 @@ public: stream_ = stream; } - void SetPrintf(int (*printf_fn)(FILE *, const char *, ...)) { + void SetPrintf(fprintf_function printf_fn) { printf_ = printf_fn; }
@@ -53,7 +53,7 @@ protected: } private: - int (*printf_)(FILE *, const char *, ...); + fprintf_function printf_; FILE *stream_; };
Signature · 1 line
2.1.4
Quoted 7 lines · Stefan Weil
Type
fprintf_functionwhich fits here was defined with this attribute.Signed-off-by Stefan Weil <[email protected]>---
This is an optional trivial patch for 2.4 which fixes compiler warnings in my build environment (with -Wextra).
No objection if you want to put it in 2.4, though I'm a bit surprised that missing GCC_FMT_ATTR provokes warnings. The cleanup is nice anyway.
thanks
-- PMM
Peter Maydell
AppliedQuoted 6 lines · Peter Maydell
Quoted 5 lines · Stefan Weil
Type
fprintf_functionwhich fits here was defined with this attribute.Signed-off-by Stefan Weil <[email protected]>---
Quoted 8 lines
Quoted 2 lines
This is an optional trivial patch for 2.4 which fixes compiler warnings in my build environment (with -Wextra).
Reviewed-by Peter Maydell <[email protected]>No objection if you want to put it in 2.4, though I'm a bit surprised that missing
GCC_FMT_ATTRprovokes warnings. The cleanup is nice anyway.
I've applied this to target-arm.next. Thanks.
-- PMM