]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dbus: fix write() compilation error
authorJaroslav Kysela <perex@perex.cz>
Mon, 11 Aug 2014 19:20:32 +0000 (21:20 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 11 Aug 2014 19:20:32 +0000 (21:20 +0200)
Makefile
src/dbus.c

index cb7e4d30ec709ede42bbdc5131d64f9cbdbc6d2b..3ed7cb3f9cc8e6a891efa4505a0e282be4737738 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ PROG    := $(BUILDDIR)/tvheadend
 # Common compiler flags
 #
 
-CFLAGS  += -g -O2
+CFLAGS  += -g -O2 -Wunused-result
 CFLAGS  += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
 CFLAGS  += -Wmissing-prototypes
 CFLAGS  += -fms-extensions -funsigned-char -fno-strict-aliasing
index 6a79549c0eea40241f384c9ce2bd469326522416..4a8d09c7522ae9905de59fb1eea7faf08c1e9408 100644 (file)
@@ -62,6 +62,7 @@ void
 dbus_emit_signal(const char *obj_name, const char *sig_name, htsmsg_t *msg)
 {
   dbus_sig_t *ds = calloc(1, sizeof(dbus_sig_t));
+  int unused __attribute__((unused));
   size_t l;
 
   if (!dbus_running) {
@@ -77,7 +78,7 @@ dbus_emit_signal(const char *obj_name, const char *sig_name, htsmsg_t *msg)
   pthread_mutex_lock(&dbus_lock);
   TAILQ_INSERT_TAIL(&dbus_signals, ds, link);
   pthread_mutex_unlock(&dbus_lock);
-  (void)write(dbus_pipe.wr, "s", 1); /* do not wait here - no tvh_write() */
+  unused = write(dbus_pipe.wr, "s", 1); /* do not wait here - no tvh_write() */
 }
 
 void