mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-07 09:48:48 +00:00
common/recorder.h: do not complain on unused (dummy) recorders
Signed-off-by: Kevin Pouget <kpouget@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
4727c19d36
commit
2640ff294a
@ -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) \
|
||||
|
||||
@ -73,6 +73,7 @@ test_dummy_recorder_SOURCES = \
|
||||
$(NULL)
|
||||
test_dummy_recorder_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(PROTOCOL_CFLAGS) \
|
||||
$(NULL)
|
||||
test_dummy_recorder_LDADD = \
|
||||
$(top_builddir)/common/libspice-common.la \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user