[PATCH spice-common] common/recorder.h: do not complain on unused (dummy) recorders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Kevin Pouget <kpouget@xxxxxxxxxx>
---
 common/recorder.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/recorder.h b/common/recorder.h
index 98b8797..8448e02 100644
--- a/common/recorder.h
+++ b/common/recorder.h
@@ -20,6 +20,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
+#include <spice/macros.h>
 
 /* Replacement declarations.
  * There declarations should generate no code (beside when no optimization are
@@ -45,7 +46,7 @@ typedef struct SpiceDummyTweak {
 #define RECORDER(rec, num_rings, comment) \
     RECORDER_DEFINE(rec, num_rings, comment)
 #define RECORDER_DEFINE(rec, num_rings, comment) \
-    const SpiceEmptyStruct spice_recorder_ ## rec = {}
+    const SpiceEmptyStruct SPICE_GNUC_UNUSED spice_recorder_ ## rec = {}
 #define RECORDER_TRACE(rec) \
     (sizeof(spice_recorder_ ## rec) != sizeof(SpiceEmptyStruct))
 #define RECORDER_TWEAK_DECLARE(rec) \
-- 
2.21.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]