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>2013-03-13 19:41:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-13 19:41:14 +0400
commit80de3192a78a78447810a42c9c404e9b0244dfb2 (patch)
tree871858390054e2a24e55a7d451737c358b93124d /source/blender
parent6d070e47c1862b76a0e0b56ee697c8828a15b866 (diff)
attempt to quiet warnings for gcc4.2
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/BLI_math_base.h4
-rw-r--r--source/blender/blenlib/BLI_math_geom.h4
-rw-r--r--source/blender/blenlib/BLI_math_inline.h5
-rw-r--r--source/blender/blenlib/BLI_math_vector.h4
4 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 1f42d94b1dd..67c1ffcebc0 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -179,7 +179,7 @@
#include "intern/math_base_inline.c"
#endif
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wredundant-decls"
#endif
@@ -222,7 +222,7 @@ extern double round(double x);
double double_round(double x, int ndigits);
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic pop
#endif
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 593aba75361..bc82b7e393b 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -40,7 +40,7 @@ extern "C" {
#include "intern/math_geom_inline.c"
#endif
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wredundant-decls"
#endif
@@ -286,7 +286,7 @@ MINLINE int min_axis_v3(const float vec[3]);
MINLINE int poly_to_tri_count(const int poly_count, const int corner_count);
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic pop
#endif
diff --git a/source/blender/blenlib/BLI_math_inline.h b/source/blender/blenlib/BLI_math_inline.h
index 6dad44644f2..2bf3b9532dd 100644
--- a/source/blender/blenlib/BLI_math_inline.h
+++ b/source/blender/blenlib/BLI_math_inline.h
@@ -56,6 +56,11 @@ extern "C" {
# define MALWAYS_INLINE
#endif
+/* gcc 4.6 (supports push/pop) */
+#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))
+# define BLI_MATH_GCC_WARN_PRAGMA 1
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index a4afb3b5612..c9ad19f74b4 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -42,7 +42,7 @@ extern "C" {
/************************************* Init ***********************************/
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wredundant-decls"
#endif
@@ -266,7 +266,7 @@ void fill_vn_i(int *array_tar, const int size, const int val);
void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val);
void fill_vn_fl(float *array_tar, const int size, const float val);
-#ifdef __GNUC__
+#ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic pop
#endif