Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-03-30 13:35:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-30 13:35:59 +0400
commit0319db10639217a17f77b9d1e16e8e28dca6022e (patch)
tree43b9bfb5da224676275b06b237c163649847bab2 /source/blender
parent905c8168348bc67664dd90e45d2b0104fb3cfc2e (diff)
Correct own recent changes broke release builds
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenfont/intern/blf_font.c3
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c3
-rw-r--r--source/blender/blenlib/BLI_rand.h4
-rw-r--r--source/blender/blenlib/BLI_strict_flags.h9
-rw-r--r--source/blender/blenlib/BLI_utildefines.h2
-rw-r--r--source/blender/blenlib/intern/rand.c6
-rw-r--r--source/blender/blenlib/intern/scanfill.c3
-rw-r--r--source/blender/blenlib/intern/scanfill_utils.c2
-rw-r--r--source/blender/blenlib/intern/timecode.c3
9 files changed, 20 insertions, 15 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index ac035026814..324d20b2703 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -55,7 +55,6 @@
#include "BLI_threads.h"
#include "BLI_alloca.h"
#include "BLI_linklist.h" /* linknode */
-#include "BLI_strict_flags.h"
#include "BIF_gl.h"
#include "BLF_api.h"
@@ -65,6 +64,8 @@
#include "blf_internal_types.h"
#include "blf_internal.h"
+#include "BLI_strict_flags.h"
+
/* freetype2 handle ONLY for this file!. */
static FT_Library ft_lib;
static SpinLock ft_lib_mutex;
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index 6aec474e2d0..9f05284ef31 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -82,10 +82,11 @@
#include "BLI_rect.h"
#include "BLI_listbase.h"
#include "BLI_linklist.h"
-#include "BLI_strict_flags.h"
#include "BKE_mask.h"
+#include "BLI_strict_flags.h"
+
/* this is rather and annoying hack, use define to isolate it.
* problem is caused by scanfill removing edges on us. */
#define USE_SCANFILL_EDGE_WORKAROUND
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