sim: ppc: fix some more Wunused-function warnings
authorTom de Vries <tdevries@suse.de>
Wed, 19 May 2021 15:46:24 +0000 (17:46 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 19 May 2021 15:46:24 +0000 (17:46 +0200)
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.

sim/ppc/device.h

index 6fd198de70dd52a36e2df9a07495fe3665d9a19c..353358761b5aedea68d66b9d9bea604f6ce7947a 100644 (file)
@@ -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);