Kaynağa Gözat

Muted additional compiler warnings

Evgeny Grin (Karlson2k) 8 yıl önce
ebeveyn
işleme
72576ec265
2 değiştirilmiş dosya ile 11 ekleme ve 1 silme
  1. 3 1
      src/microhttpd/connection.c
  2. 8 0
      src/microhttpd/daemon.c

+ 3 - 1
src/microhttpd/connection.c

@@ -1036,7 +1036,9 @@ connection_close_error (struct MHD_Connection *connection,
   if (NULL != emsg)
     MHD_DLOG (connection->daemon,
               emsg);
-#endif
+#else  /* ! HAVE_MESSAGES */
+  (void)emsg; /* Mute compiler warning. */
+#endif /* ! HAVE_MESSAGES */
   MHD_connection_close_ (connection,
                          MHD_REQUEST_TERMINATED_WITH_ERROR);
 }

+ 8 - 0
src/microhttpd/daemon.c

@@ -137,6 +137,10 @@ mhd_panic_std (void *cls,
 	   file,
            line,
            reason);
+#else  /* ! HAVE_MESSAGES */
+  (void)file;   /* Mute compiler warning. */
+  (void)line;   /* Mute compiler warning. */
+  (void)reason; /* Mute compiler warning. */
 #endif
   abort ();
 }
@@ -5071,6 +5075,10 @@ setup_epoll_fd (struct MHD_Daemon *daemon)
 {
   int fd;
 
+#ifndef HAVE_MESSAGES
+  (void)daemon; /* Mute compiler warning. */
+#endif /* ! HAVE_MESSAGES */
+
 #ifdef USE_EPOLL_CREATE1
   fd = epoll_create1 (EPOLL_CLOEXEC);
 #else  /* ! USE_EPOLL_CREATE1 */