mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-13 08:50:53 +00:00
mcstrans: silence -Wextra-semi-stmt warning
On Ubuntu 20.04, when building with clang -Werror -Wextra-semi-stmt (which is not the default build configuration), the compiler reports: mcstransd.c:72:35: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] log_debug("%s\n", "cleanup_exit"); ^ Replace the empty log_debug substitution with a do { ... } while (0) construction to silence this warning. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
e45bc87094
commit
e293718f0e
@ -43,7 +43,7 @@
|
||||
#ifdef DEBUG
|
||||
#define log_debug(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
|
||||
#else
|
||||
#define log_debug(fmt, ...) ;
|
||||
#define log_debug(fmt, ...) do {} while (0)
|
||||
#endif
|
||||
|
||||
static unsigned int maxbit=0;
|
||||
|
@ -40,7 +40,7 @@
|
||||
//#define log_debug(fmt, ...) syslog(LOG_DEBUG, fmt, __VA_ARGS__)
|
||||
#define log_debug(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
|
||||
#else
|
||||
#define log_debug(fmt, ...) ;
|
||||
#define log_debug(fmt, ...) do {} while (0)
|
||||
#endif
|
||||
|
||||
extern int init_translations(void);
|
||||
|
Loading…
Reference in New Issue
Block a user