diff options
author | Peter Meerwald-Stadler <pmeerw@pmeerw.net> | 2017-03-07 16:29:30 +0100 |
---|---|---|
committer | Peter Meerwald-Stadler <pmeerw@pmeerw.net> | 2017-03-08 14:31:29 +0100 |
commit | a199b9045ea154b0996f3f74fcbe4c1adcd0aa22 (patch) | |
tree | 45eb40e45ab6b9120e0d7982a27b7967eb565bd8 /src/modules | |
parent | 48ba5e4957414a2cf9eae23f08988c8fc2f9169a (diff) |
build: Use #ifdef to check for #defines
for example, in case HAVE_MEMFD is #undef, checking with #if HAVE_MEMFD
gives a warning (gcc 5.4.1, Ubuntu)
pulsecore/shm.c: In function 'sharedmem_create':
pulsecore/shm.c:208:5: warning: "HAVE_MEMFD" is not defined [-Wundef]
#if HAVE_MEMFD
use #ifdef or #if defined() to check for presence of a #define
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/dbus/module-dbus-protocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/dbus/module-dbus-protocol.c b/src/modules/dbus/module-dbus-protocol.c index 8079d6b4..2cd206e3 100644 --- a/src/modules/dbus/module-dbus-protocol.c +++ b/src/modules/dbus/module-dbus-protocol.c @@ -220,7 +220,7 @@ static void io_event_cb(pa_mainloop_api *mainloop, pa_io_event *e, int fd, pa_io unsigned int flags = 0; DBusWatch *watch = userdata; -#if HAVE_DBUS_WATCH_GET_UNIX_FD +#ifdef HAVE_DBUS_WATCH_GET_UNIX_FD pa_assert(fd == dbus_watch_get_unix_fd(watch)); #else pa_assert(fd == dbus_watch_get_fd(watch)); @@ -291,7 +291,7 @@ static dbus_bool_t watch_add_cb(DBusWatch *watch, void *data) { ev = mainloop->io_new( mainloop, -#if HAVE_DBUS_WATCH_GET_UNIX_FD +#ifdef HAVE_DBUS_WATCH_GET_UNIX_FD dbus_watch_get_unix_fd(watch), #else dbus_watch_get_fd(watch), |