Explorar o código

Fix unused variable warning for non-DEBUG build

Kevin Wojniak %!s(int64=10) %!d(string=hai) anos
pai
achega
984e028d42
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/civetweb.c

+ 4 - 0
src/civetweb.c

@@ -114,7 +114,11 @@ int clock_gettime(int clk_id, struct timespec* t) {
 
         if (start_time == 0) {
             kern_return_t mach_status = mach_timebase_info(&timebase_ifo);
+#if defined(DEBUG)
             assert(mach_status == KERN_SUCCESS);
+#else
+            (void)mach_status; // appease "unused variable" warning for release builds
+#endif
             start_time = now;
         }