xref: /netbsd-src/external/apache2/mDNSResponder/dist/unittests/daemon_ut.c (revision 901e7e84758515fbf39dfc064cb0b45ab146d8b0)
1 #include "DNSCommon.h"
2 
3 mDNSexport void init_logging_ut(void)
4 {
5 #if APPLE_OSX_mDNSResponder
6 	init_logging();
7 
8 	/* When doing unit testing, it is likely that some local functions and
9 	 * variables will not be needed to do unit testing validation. So to get
10 	 * around compiler warnings about unused functions or variables, each
11 	 * warning work-around is handled explicitly below.
12 	 */
13 
14 	/* The next three LogOperation() are used to trick the compiler into
15 	 * suppressing unused function and variable warnings. This is done by
16 	 * outputting the function or variable pointer to a log message.
17 	 */
18 	LogOperation("Quiet compiler warnings for KQueueLoop= %p, "
19 		   "KQWokenFlushBytes= %p, SignalCallback= %p, "
20 		   "mDNS_StatusCallback= %p, LaunchdCheckin= %p",
21 		   KQueueLoop, KQWokenFlushBytes,
22 		   SignalCallback, mDNS_StatusCallback,
23 		   LaunchdCheckin);
24 	LogOperation("Quiet compiler warnings for SandboxProcess= %p, "
25 		   "mDNSDaemonInitialize= %p, HandleSIG= %p, "
26 		   "PreferencesGetValueInt= %p, PreferencesGetValueBool= %p",
27 		   SandboxProcess, mDNSDaemonInitialize,
28 		   HandleSIG, PreferencesGetValueInt,
29 		   PreferencesGetValueBool);
30 	LogOperation("Quiet compiler warnings for rrcachestorage= %p, "
31 		   "NoMulticastAdvertisements= %p",
32 		   rrcachestorage, NoMulticastAdvertisements);
33 
34 #endif // APPLE_OSX_mDNSResponder
35 }
36