diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-30 13:35:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-30 13:35:59 +0400 |
commit | 0319db10639217a17f77b9d1e16e8e28dca6022e (patch) | |
tree | 43b9bfb5da224676275b06b237c163649847bab2 /source/blender/blenlib | |
parent | 905c8168348bc67664dd90e45d2b0104fb3cfc2e (diff) |
Correct own recent changes broke release builds
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_rand.h | 4 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_strict_flags.h | 9 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/rand.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/scanfill.c | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/scanfill_utils.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/timecode.c | 3 |
7 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h index 011b6ea572f..045cadbcc6f 100644 --- a/source/blender/blenlib/BLI_rand.h +++ b/source/blender/blenlib/BLI_rand.h @@ -51,7 +51,7 @@ unsigned int BLI_rng_get_uint(struct RNG *rng); double BLI_rng_get_double(struct RNG *rng); float BLI_rng_get_float(struct RNG *rng); void BLI_rng_get_float_unit_v3(struct RNG *rng, float v[3]); -void BLI_rng_shuffle_array(struct RNG *rng, void *data, size_t elem_size, unsigned int elem_tot); +void BLI_rng_shuffle_array(struct RNG *rng, void *data, unsigned int elem_size_i, unsigned int elem_tot); /** Note that skipping is as slow as generating n numbers! */ void BLI_rng_skip(struct RNG *rng, int n); @@ -73,7 +73,7 @@ float BLI_hash_frand(unsigned int seed); * contents. This routine does not use nor modify * the state of the BLI random number generator. */ -void BLI_array_randomize(void *data, size_t elem_size, unsigned int elem_tot, unsigned int seed); +void BLI_array_randomize(void *data, unsigned int elem_size, unsigned int elem_tot, unsigned int seed); /** Better seed for the random number generator, using noise.c hash[] */ diff --git a/source/blender/blenlib/BLI_strict_flags.h b/source/blender/blenlib/BLI_strict_flags.h index 908d02eb4ad..1d595ff3bf3 100644 --- a/source/blender/blenlib/BLI_strict_flags.h +++ b/source/blender/blenlib/BLI_strict_flags.h @@ -28,7 +28,6 @@ */ #ifdef __GNUC__ -# pragma GCC diagnostic error "-Wpedantic" # pragma GCC diagnostic error "-Wsign-conversion" # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */ # pragma GCC diagnostic error "-Wsign-compare" @@ -37,8 +36,12 @@ # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 /* gcc4.8+ only (behavior changed to ignore globals)*/ # pragma GCC diagnostic error "-Wshadow" # endif -# ifdef __clang__ /* pedantic causes clang error */ -# pragma GCC diagnostic ignored "-Wlanguage-extension-token" +/* pedantic gives too many issues, developers can define this for own use */ +# ifdef WARN_PEDANTIC +# pragma GCC diagnostic error "-Wpedantic" +# ifdef __clang__ /* pedantic causes clang error */ +# pragma GCC diagnostic ignored "-Wlanguage-extension-token" +# endif # endif #endif diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 46553ccc0fc..ef6edda1118 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -458,7 +458,7 @@ #if (!defined(__cplusplus)) && \ (!defined(__COVERITY__)) && \ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) /* gcc4.6+ only */ -# define BLI_STATIC_ASSERT(a, msg) _Static_assert(a, msg); +# define BLI_STATIC_ASSERT(a, msg) __extension__ _Static_assert(a, msg); #else /* TODO msvc, clang */ # define BLI_STATIC_ASSERT(a, msg) diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c index 0afa4f81dba..f245fd3ca0d 100644 --- a/source/blender/blenlib/intern/rand.c +++ b/source/blender/blenlib/intern/rand.c @@ -141,9 +141,9 @@ void BLI_rng_get_float_unit_v3(RNG *rng, float v[3]) } } -void BLI_rng_shuffle_array(RNG *rng, void *data, size_t elem_size, unsigned int elem_tot) +void BLI_rng_shuffle_array(RNG *rng, void *data, unsigned int elem_size_i, unsigned int elem_tot) { - const unsigned int elem_size_i = (unsigned int)elem_size; + const size_t elem_size = (unsigned int)elem_size_i; unsigned int i = elem_tot; void *temp; @@ -211,7 +211,7 @@ float BLI_hash_frand(unsigned int seed) return BLI_rng_get_float(&rng); } -void BLI_array_randomize(void *data, size_t elem_size, unsigned int elem_tot, unsigned int seed) +void BLI_array_randomize(void *data, unsigned int elem_size, unsigned int elem_tot, unsigned int seed) { RNG rng; diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 0610414b710..69049b51f87 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -42,10 +42,11 @@ #include "BLI_math.h" #include "BLI_memarena.h" #include "BLI_utildefines.h" -#include "BLI_strict_flags.h" #include "BLI_scanfill.h" /* own include */ +#include "BLI_strict_flags.h" + /* local types */ typedef struct PolyFill { unsigned int edges, verts; diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c index 4bee16319f3..1ece34a0944 100644 --- a/source/blender/blenlib/intern/scanfill_utils.c +++ b/source/blender/blenlib/intern/scanfill_utils.c @@ -35,11 +35,11 @@ #include "BLI_listbase.h" #include "BLI_math.h" #include "BLI_utildefines.h" -#include "BLI_strict_flags.h" #include "BLI_ghash.h" #include "BLI_scanfill.h" /* own include */ +#include "BLI_strict_flags.h" typedef struct PolyInfo { ScanFillEdge *edge_first, *edge_last; diff --git a/source/blender/blenlib/intern/timecode.c b/source/blender/blenlib/intern/timecode.c index cd703741831..7b2ac9e112b 100644 --- a/source/blender/blenlib/intern/timecode.c +++ b/source/blender/blenlib/intern/timecode.c @@ -38,10 +38,9 @@ #include "BLI_timecode.h" /* own include */ -#include "BLI_strict_flags.h" - #include "DNA_userdef_types.h" /* for eTimecodeStyles only */ +#include "BLI_strict_flags.h" /** * Generate timecode/frame number string and store in \a str |