diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-21 05:00:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-21 05:02:38 +0300 |
commit | 32be51dc66ae0e791970c8b7326afa16d60aa267 (patch) | |
tree | bc3c59d9b70f453e06917a3f47e6a6b9791df96f /source/blender/blenlib/intern | |
parent | 6f224941408eda8930489fa440af9539a92badad (diff) |
Cleanup: warnings (msvc)
Part of patch D1670 by @LazyDodo
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/buffer.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/dynlib.c | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/sort.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/time.c | 3 |
5 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/buffer.c b/source/blender/blenlib/intern/buffer.c index 24b2228c884..525b18333af 100644 --- a/source/blender/blenlib/intern/buffer.c +++ b/source/blender/blenlib/intern/buffer.c @@ -107,7 +107,7 @@ void BLI_buffer_resize(BLI_Buffer *buffer, const size_t new_count) * - Ignored (malloc'd) * - Cleared (when BLI_BUFFER_USE_CALLOC is set) */ -void BLI_buffer_reinit(BLI_Buffer *buffer, size_t new_count) +void BLI_buffer_reinit(BLI_Buffer *buffer, const size_t new_count) { if (UNLIKELY(new_count > buffer->alloc_count)) { if ((buffer->flag & BLI_BUFFER_USE_STATIC) == 0) { diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c index e916b01e859..b47c2ee60a6 100644 --- a/source/blender/blenlib/intern/dynlib.c +++ b/source/blender/blenlib/intern/dynlib.c @@ -42,8 +42,9 @@ struct DynamicLibrary { }; #ifdef WIN32 - +#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x501 /* Windows XP or newer */ +#endif #define WIN32_LEAN_AND_MEAN #include <windows.h> #include "utf_winfunc.h" diff --git a/source/blender/blenlib/intern/sort.c b/source/blender/blenlib/intern/sort.c index c5922feb0ed..190c874e1b5 100644 --- a/source/blender/blenlib/intern/sort.c +++ b/source/blender/blenlib/intern/sort.c @@ -40,6 +40,10 @@ #include "BLI_sort.h" +#ifdef min /* for msvc */ +# undef min +#endif + /* note: modified to use glibc arg order for callback */ /* **** qsort based on FreeBSD source (libkern\qsort.c) **** */ BLI_INLINE char *med3(char *, char *, char *, BLI_sort_cmp_t, void *); diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index e93d2b7507a..efc89ff6a15 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -841,7 +841,7 @@ bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, s * \param end The string we look for at the end. * \return If str ends with end. */ -bool BLI_str_endswith(const char *__restrict str, const char *end) +bool BLI_str_endswith(const char *__restrict str, const char * __restrict end) { const size_t slength = strlen(str); return BLI_strn_endswith(str, end, slength); diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c index a0fb78cd193..3cf3221bd08 100644 --- a/source/blender/blenlib/intern/time.c +++ b/source/blender/blenlib/intern/time.c @@ -33,8 +33,9 @@ #include "PIL_time.h" #ifdef WIN32 - +#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x501 /* Windows XP or newer */ +#endif #define WIN32_LEAN_AND_MEAN #include <windows.h> |