attempt to quiet warnings for gcc4.2

This commit is contained in:
Campbell Barton 2013-03-13 15:41:14 +00:00
parent 6d070e47c1
commit 80de3192a7
4 changed files with 11 additions and 6 deletions

@ -179,7 +179,7 @@
#include "intern/math_base_inline.c" #include "intern/math_base_inline.c"
#endif #endif
#ifdef __GNUC__ #ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic push # pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wredundant-decls" # pragma GCC diagnostic ignored "-Wredundant-decls"
#endif #endif
@ -222,7 +222,7 @@ extern double round(double x);
double double_round(double x, int ndigits); double double_round(double x, int ndigits);
#ifdef __GNUC__ #ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif

@ -40,7 +40,7 @@ extern "C" {
#include "intern/math_geom_inline.c" #include "intern/math_geom_inline.c"
#endif #endif
#ifdef __GNUC__ #ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic push # pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wredundant-decls" # pragma GCC diagnostic ignored "-Wredundant-decls"
#endif #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); 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 # pragma GCC diagnostic pop
#endif #endif

@ -56,6 +56,11 @@ extern "C" {
# define MALWAYS_INLINE # define MALWAYS_INLINE
#endif #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 #ifdef __cplusplus
} }
#endif #endif

@ -42,7 +42,7 @@ extern "C" {
/************************************* Init ***********************************/ /************************************* Init ***********************************/
#ifdef __GNUC__ #ifdef BLI_MATH_GCC_WARN_PRAGMA
# pragma GCC diagnostic push # pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wredundant-decls" # pragma GCC diagnostic ignored "-Wredundant-decls"
#endif #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_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); 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 # pragma GCC diagnostic pop
#endif #endif