소스 검색

rm warning

ithewei 3 년 전
부모
커밋
274a4f9944
3개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      base/hlog.c
  2. 1 1
      base/hlog.h
  3. 6 0
      base/hplatform.h

+ 1 - 1
base/hlog.c

@@ -438,7 +438,7 @@ logger_t* hv_default_logger() {
     }
     return s_logger;
 }
-void hv_destroy_default_logger() {
+void hv_destroy_default_logger(void) {
     if (s_logger) {
         logger_fsync(s_logger);
         logger_destroy(s_logger);

+ 1 - 1
base/hlog.h

@@ -119,7 +119,7 @@ HV_EXPORT const char* logger_get_cur_file(logger_t* logger);
 
 // hlog: default logger instance
 HV_EXPORT logger_t* hv_default_logger();
-HV_EXPORT void      hv_destroy_default_logger();
+HV_EXPORT void      hv_destroy_default_logger(void);
 
 // macro hlog*
 #define hlog                            hv_default_logger()

+ 6 - 0
base/hplatform.h

@@ -137,9 +137,15 @@
     #ifndef WIN32_LEAN_AND_MEAN
     #define WIN32_LEAN_AND_MEAN
     #endif
+    #ifndef _CRT_NONSTDC_NO_DEPRECATE
     #define _CRT_NONSTDC_NO_DEPRECATE
+    #endif
+    #ifndef _CRT_SECURE_NO_WARNINGS
     #define _CRT_SECURE_NO_WARNINGS
+    #endif
+    #ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
     #define _WINSOCK_DEPRECATED_NO_WARNINGS
+    #endif
     #include <winsock2.h>
     #include <ws2tcpip.h>   // for inet_pton,inet_ntop
     #include <windows.h>