Macros that are meant for statements (instead of expressions) SHALL

never be defined to an empty string, because in that case,

	if (condition) DPRINTF(...); else err(...);

results in a gcc warning, and possibly worse things.
This commit is contained in:
rillig 2007-09-17 01:23:17 +00:00
parent e3218c4391
commit feff384922

View File

@ -1,4 +1,4 @@
/* $NetBSD: bluetooth.h,v 1.5 2007/04/21 06:15:22 plunky Exp $ */
/* $NetBSD: bluetooth.h,v 1.6 2007/09/17 01:23:17 rillig Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@ -139,9 +139,9 @@ extern int bluetooth_debug;
# define UNKNOWN(value) \
printf("%s: %s = %d unknown!\n", __func__, #value, (value));
#else
# define DPRINTF(...)
# define DPRINTFN(...)
# define UNKNOWN(x)
# define DPRINTF(...) ((void)0)
# define DPRINTFN(...) ((void)0)
# define UNKNOWN(x) ((void)0)
#endif /* BLUETOOTH_DEBUG */
#endif /* _KERNEL */