2 #include "unittest_common.h"
4 mDNSexport
void init_logging_ut(void)
6 #if APPLE_OSX_mDNSResponder
9 /* When doing unit testing, it is likely that some local functions and
10 * variables will not be needed to do unit testing validation. So to get
11 * around compiler warnings about unused functions or variables, each
12 * warning work-around is handled explicitly below.
15 /* The next three LogOperation() are used to trick the compiler into
16 * suppressing unused function and variable warnings. This is done by
17 * outputting the function or variable pointer to a log message.
19 LogOperation("Quiet compiler warnings for KQueueLoop= %p, "
20 "KQWokenFlushBytes= %p, SignalCallback= %p, "
21 "mDNS_StatusCallback= %p, LaunchdCheckin= %p",
22 KQueueLoop
, KQWokenFlushBytes
,
23 SignalCallback
, mDNS_StatusCallback
,
25 LogOperation("Quiet compiler warnings for SandboxProcess= %p, "
26 "mDNSDaemonInitialize= %p, HandleSIG= %p, "
27 "PreferencesGetValueInt= %p, PreferencesGetValueBool= %p",
28 SandboxProcess
, mDNSDaemonInitialize
,
29 HandleSIG
, PreferencesGetValueInt
,
30 PreferencesGetValueBool
);
31 LogOperation("Quiet compiler warnings for rrcachestorage= %p, "
32 "NoMulticastAdvertisements= %p",
33 rrcachestorage
, NoMulticastAdvertisements
);
35 #endif // APPLE_OSX_mDNSResponder