فهرست منبع

Fix some warnings for Windows

bel 9 سال پیش
والد
کامیت
9beff402e8
1فایلهای تغییر یافته به همراه8 افزوده شده و 3 حذف شده
  1. 8 3
      src/civetweb.c

+ 8 - 3
src/civetweb.c

@@ -109,6 +109,12 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check");
 #define PATH_MAX FILENAME_MAX
 #endif /* __SYMBIAN32__ */
 
+
+/* Include the header file here, so the CivetWeb interface is defined for the
+ * entire implementation, including the following forward definitions. */
+#include "civetweb.h"
+
+
 #ifndef IGNORE_UNUSED_RESULT
 #define IGNORE_UNUSED_RESULT(a) ((void)((a) && 1))
 #endif
@@ -543,9 +549,6 @@ static pthread_mutexattr_t pthread_mutex_attr;
 #endif /* _WIN32 */
 
 
-#include "civetweb.h"
-
-
 #define PASSWORDS_FILE_NAME ".htpasswd"
 #define CGI_ENVIRONMENT_SIZE (4096)
 #define MAX_CGI_ENVIR_VARS (256)
@@ -1280,6 +1283,7 @@ struct mg_context {
 #endif
 };
 
+
 struct mg_connection {
 	struct mg_request_info request_info;
 	struct mg_context *ctx;
@@ -2870,6 +2874,7 @@ path_to_unicode(const struct mg_connection *conn,
 	    }
 	}
 	*/
+	(void)conn; /* conn is currently unused */
 
 	/* Only accept a full file path, not a Windows short (8.3) path. */
 	memset(wbuf2, 0, ARRAY_SIZE(wbuf2) * sizeof(wchar_t));