소스 검색

Fix unused variable warning for non-DEBUG build

Kevin Wojniak 10 년 전
부모
커밋
984e028d42
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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;
         }