public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: ppc: fix some more Wunused-function warnings
@ 2021-05-19 10:46 Tom de Vries
  2021-05-19 14:42 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2021-05-19 10:46 UTC (permalink / raw)
  To: gdb-patches, andrew.burgess, vapier

Hi,

When compiling with --enable-werror and CFLAGS="-O0 -g -Wall", we run into:
...
In file included from src/sim/ppc/cpu.h:26:0,
                 from src/sim/ppc/mon.c:25,
                 from src/sim/ppc/inline.c:64,
                 from idecode.c:26:
src/sim/ppc/device.h:788:8: error: 'device_event_queue_deschedule' \
  declared 'static' but never defined [-Werror=unused-function]
 (void) device_event_queue_deschedule
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

This seems to be caused by the fact that the function is declared using
INLINE_EVENT instead of INLINE_DEVICE.

Fix this and a similar error in the same file.

Any comments?

Thanks,
- Tom

sim: ppc: fix some more Wunused-function warnings

---
 sim/ppc/device.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/ppc/device.h b/sim/ppc/device.h
index 6fd198de70d..353358761b5 100644
--- a/sim/ppc/device.h
+++ b/sim/ppc/device.h
@@ -784,12 +784,12 @@ INLINE_DEVICE\
  device_event_handler *handler,
  void *data);
 
-INLINE_EVENTS\
+INLINE_DEVICE\
 (void) device_event_queue_deschedule
 (device *me,
  event_entry_tag event_to_remove);
 
-INLINE_EVENTS\
+INLINE_DEVICE\
 (signed64) device_event_queue_time
 (device *me);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sim: ppc: fix some more Wunused-function warnings
  2021-05-19 10:46 [PATCH] sim: ppc: fix some more Wunused-function warnings Tom de Vries
@ 2021-05-19 14:42 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2021-05-19 14:42 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches, andrew.burgess

looks good, thanks
-mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-19 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 10:46 [PATCH] sim: ppc: fix some more Wunused-function warnings Tom de Vries
2021-05-19 14:42 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).