From 10b4a86dbfd9ce56e53f5369258aebbac2f28be3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 29 Mar 2013 00:50:52 +0000 Subject: [PATCH] code cleanup: quiet warnings building with mingw. --- intern/guardedalloc/MEM_sys_types.h | 5 ----- intern/opennl/superlu/superlu_sys_types.h | 2 -- intern/utfconv/utf_winfunc.c | 1 + intern/utfconv/utf_winfunc.h | 1 - intern/utfconv/utfconv.h | 2 -- source/blender/blenlib/intern/fileops.c | 6 +++--- source/blender/blenlib/intern/path_util.c | 3 ++- source/blender/blenloader/BLO_sys_types.h | 4 ---- 8 files changed, 6 insertions(+), 18 deletions(-) diff --git a/intern/guardedalloc/MEM_sys_types.h b/intern/guardedalloc/MEM_sys_types.h index 3d43733c569..72563fc988d 100644 --- a/intern/guardedalloc/MEM_sys_types.h +++ b/intern/guardedalloc/MEM_sys_types.h @@ -108,10 +108,6 @@ typedef uint64_t u_int64_t; #include #elif defined(FREE_WINDOWS) -#ifndef FREE_WINDOWS64 -/* define htoln here, there must be a syntax error in winsock2.h in MinGW */ -unsigned long __attribute__((__stdcall__)) htonl(unsigned long); -#endif #include #else @@ -144,4 +140,3 @@ unsigned long __attribute__((__stdcall__)) htonl(unsigned long); #endif #endif /* __MEM_SYS_TYPES_H__ */ - diff --git a/intern/opennl/superlu/superlu_sys_types.h b/intern/opennl/superlu/superlu_sys_types.h index 80d3da4d243..5685b34f1f4 100644 --- a/intern/opennl/superlu/superlu_sys_types.h +++ b/intern/opennl/superlu/superlu_sys_types.h @@ -98,8 +98,6 @@ typedef unsigned long uintptr_t; #include #elif defined(FREE_WINDOWS) -/* define htoln here, there must be a syntax error in winsock2.h in MinGW */ -unsigned long __attribute__((__stdcall__)) htonl(unsigned long); #include #else diff --git a/intern/utfconv/utf_winfunc.c b/intern/utfconv/utf_winfunc.c index 3d7fb11309a..9f3e96b47fe 100644 --- a/intern/utfconv/utf_winfunc.c +++ b/intern/utfconv/utf_winfunc.c @@ -28,6 +28,7 @@ #endif #include "utf_winfunc.h" +#include "utfconv.h" #include #include #include diff --git a/intern/utfconv/utf_winfunc.h b/intern/utfconv/utf_winfunc.h index 45f6844af5a..e23a5dd5797 100644 --- a/intern/utfconv/utf_winfunc.h +++ b/intern/utfconv/utf_winfunc.h @@ -27,7 +27,6 @@ # error "This file can only compile on windows" #endif -#include "utfconv.h" #include FILE * ufopen(const char * filename, const char * mode); diff --git a/intern/utfconv/utfconv.h b/intern/utfconv/utfconv.h index ada85e274e3..22710bfdb37 100644 --- a/intern/utfconv/utfconv.h +++ b/intern/utfconv/utfconv.h @@ -27,8 +27,6 @@ #include #include - - #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 8b3cfd07ee9..ad6a9ff2ac3 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -45,7 +45,7 @@ #ifdef __MINGW32__ #include #endif -#include +# include # include "BLI_winstuff.h" # include "BLI_callbacks.h" # include "utf_winfunc.h" @@ -374,7 +374,7 @@ void BLI_dir_create_recursive(const char *dirname) * blah1/blah2 (without slash) */ BLI_strncpy(tmp, dirname, sizeof(tmp)); - lslash = BLI_last_slash(tmp); + lslash = (char *)BLI_last_slash(tmp); if (lslash && (*(lslash + 1) == '\0')) { *lslash = '\0'; @@ -385,7 +385,7 @@ void BLI_dir_create_recursive(const char *dirname) if (BLI_exists(tmp)) return; - lslash = BLI_last_slash(tmp); + lslash = (char *)BLI_last_slash(tmp); if (lslash) { /* Split about the last slash and recurse */ diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 6b9b371a4f3..1f96c10e712 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -61,7 +61,8 @@ #endif #ifdef WIN32 -#include "utf_winfunc.h" +# include "utf_winfunc.h" +# include "utfconv.h" # include # ifdef _WIN32_IE # undef _WIN32_IE diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h index 4e76481c394..73434259432 100644 --- a/source/blender/blenloader/BLO_sys_types.h +++ b/source/blender/blenloader/BLO_sys_types.h @@ -100,10 +100,6 @@ typedef uint64_t u_int64_t; #include #elif defined(FREE_WINDOWS) -#ifndef FREE_WINDOWS64 -/* define htoln here, there must be a syntax error in winsock2.h in MinGW */ -unsigned long __attribute__((__stdcall__)) htonl(unsigned long); -#endif #include #else