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-12 00:27:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-12 00:27:38 +0400
commit660be3da39a419c17c953c6a5f483903129f886f (patch)
treec11639266f56843d4d412a27970fcf60d0eb6bcb /source/blender/blenlib
parent8560b141ebb80e7f56626e4919b053e816fd3c98 (diff)
use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations which have been removed.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_math_base.h9
-rw-r--r--source/blender/blenlib/BLI_math_geom.h9
-rw-r--r--source/blender/blenlib/BLI_math_vector.h9
-rw-r--r--source/blender/blenlib/intern/math_base.c7
4 files changed, 34 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index aa4e697b48b..1f42d94b1dd 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -179,6 +179,11 @@
#include "intern/math_base_inline.c"
#endif
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
+
/******************************* Float ******************************/
MINLINE float sqrt3f(float f);
@@ -217,6 +222,10 @@ extern double round(double x);
double double_round(double x, int ndigits);
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif
+
/* asserts, some math functions expect normalized inputs
* check the vector is unit length, or zero length (which can't be helped in some cases).
*/
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 13f47d94160..593aba75361 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -40,6 +40,11 @@ extern "C" {
#include "intern/math_geom_inline.c"
#endif
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
+
/********************************** Polygons *********************************/
void cent_tri_v3(float r[3], const float a[3], const float b[3], const float c[3]);
@@ -281,6 +286,10 @@ 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__
+# pragma GCC diagnostic pop
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 5476978513e..a4afb3b5612 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -42,6 +42,11 @@ extern "C" {
/************************************* Init ***********************************/
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wredundant-decls"
+#endif
+
MINLINE void zero_v2(float r[2]);
MINLINE void zero_v3(float r[3]);
MINLINE void zero_v4(float r[4]);
@@ -261,6 +266,10 @@ 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__
+# pragma GCC diagnostic pop
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/intern/math_base.c b/source/blender/blenlib/intern/math_base.c
index 6bb238ac612..38d303e667a 100644
--- a/source/blender/blenlib/intern/math_base.c
+++ b/source/blender/blenlib/intern/math_base.c
@@ -57,7 +57,14 @@ double round(double x)
return copysign(y, x);
}
#else /* OpenSuse 11.1 seems to need this. */
+# ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wredundant-decls"
+# endif
double round(double x);
+# ifdef __GNUC__
+# pragma GCC diagnostic pop
+# endif
#endif
/* from python 3.1 floatobject.c