[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55198] trunk/blender: use gcc warning -Wredundant-decls, exposes some odd/ duplicate declarations which have been removed.
Campbell Barton
ideasman42 at gmail.com
Mon Mar 11 21:27:39 CET 2013
Revision: 55198
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55198
Author: campbellbarton
Date: 2013-03-11 20:27:38 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations which have been removed.
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/build_files/cmake/macros.cmake
trunk/blender/source/blender/blenlib/BLI_math_base.h
trunk/blender/source/blender/blenlib/BLI_math_geom.h
trunk/blender/source/blender/blenlib/BLI_math_vector.h
trunk/blender/source/blender/blenlib/intern/math_base.c
trunk/blender/source/blender/bmesh/intern/bmesh_operators_private.h
trunk/blender/source/blender/bmesh/operators/bmo_wireframe.c
trunk/blender/source/blender/editors/include/ED_curve.h
trunk/blender/source/blender/editors/include/ED_mesh.h
trunk/blender/source/blender/editors/include/ED_screen.h
trunk/blender/source/blender/editors/include/ED_space_api.h
trunk/blender/source/blender/editors/mesh/mesh_intern.h
trunk/blender/source/blender/editors/screen/area.c
trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
trunk/blender/source/blender/editors/sculpt_paint/sculpt_intern.h
trunk/blender/source/blender/imbuf/intern/IMB_indexer.h
trunk/blender/source/blender/makesrna/RNA_access.h
trunk/blender/source/blender/python/bmesh/bmesh_py_types_meshdata.h
trunk/blender/source/blender/python/intern/bpy_interface.c
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/CMakeLists.txt 2013-03-11 20:27:38 UTC (rev 55198)
@@ -1924,6 +1924,7 @@
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull) # C only
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_REDUNDANT_DECLS -Wredundant-decls)
# gcc 4.2 gives annoying warnings on every file with this
if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
@@ -1944,6 +1945,7 @@
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_INIT_SELF -Winit-self) # needs -Wuninitialized
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
+ ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
# gcc 4.2 gives annoying warnings on every file with this
if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
Modified: trunk/blender/build_files/cmake/macros.cmake
===================================================================
--- trunk/blender/build_files/cmake/macros.cmake 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/build_files/cmake/macros.cmake 2013-03-11 20:27:38 UTC (rev 55198)
@@ -489,6 +489,7 @@
remove_cc_flag("-Wmissing-prototypes")
remove_cc_flag("-Wunused-parameter")
remove_cc_flag("-Wwrite-strings")
+ remove_cc_flag("-Wredundant-decls")
remove_cc_flag("-Wundef")
remove_cc_flag("-Wshadow")
remove_cc_flag("-Werror=[^ ]+")
Modified: trunk/blender/source/blender/blenlib/BLI_math_base.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_base.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/blenlib/BLI_math_base.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -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 @@
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).
*/
Modified: trunk/blender/source/blender/blenlib/BLI_math_geom.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_geom.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/blenlib/BLI_math_geom.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -40,6 +40,11 @@
#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 poly_to_tri_count(const int poly_count, const int corner_count);
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#endif
+
#ifdef __cplusplus
}
#endif
Modified: trunk/blender/source/blender/blenlib/BLI_math_vector.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_vector.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/blenlib/BLI_math_vector.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -42,6 +42,11 @@
/************************************* 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_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
Modified: trunk/blender/source/blender/blenlib/intern/math_base.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_base.c 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/blenlib/intern/math_base.c 2013-03-11 20:27:38 UTC (rev 55198)
@@ -57,7 +57,14 @@
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
Modified: trunk/blender/source/blender/bmesh/intern/bmesh_operators_private.h
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_operators_private.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_operators_private.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -30,9 +30,6 @@
struct BMesh;
struct BMOperator;
-void BMO_push(BMesh *bm, BMOperator *op);
-void BMO_pop(BMesh *bm);
-
void bmo_automerge_exec(BMesh *bm, BMOperator *op);
void bmo_average_vert_facedata_exec(BMesh *bm, BMOperator *op);
void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op);
Modified: trunk/blender/source/blender/bmesh/operators/bmo_wireframe.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_wireframe.c 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/bmesh/operators/bmo_wireframe.c 2013-03-11 20:27:38 UTC (rev 55198)
@@ -151,8 +151,6 @@
return true;
}
-extern float BM_vert_calc_mean_tagged_edge_length(BMVert *v);
-
void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
{
const bool use_boundary = BMO_slot_bool_get(op->slots_in, "use_boundary");
Modified: trunk/blender/source/blender/editors/include/ED_curve.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_curve.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/editors/include/ED_curve.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -63,8 +63,6 @@
void make_editNurb(struct Object *obedit);
void free_editNurb(struct Object *obedit);
-void BKE_curve_editNurb_free(struct Curve *cu);
-
int mouse_nurb(struct bContext *C, const int mval[2], int extend, int deselect, int toggle);
struct Nurb *add_nurbs_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], int type, int newob);
Modified: trunk/blender/source/blender/editors/include/ED_mesh.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_mesh.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/editors/include/ED_mesh.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -172,18 +172,11 @@
extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs;
-
/* mesh_ops.c */
void ED_operatortypes_mesh(void);
void ED_operatormacros_mesh(void);
void ED_keymap_mesh(struct wmKeyConfig *keyconf);
-void ED_keymap_mesh(struct wmKeyConfig *keyconf);
-
-/* spacetypes.c */
-void ED_spacetypes_init(void);
-
-
/* editmesh_tools.c (could be moved) */
void EMBM_project_snap_verts(struct bContext *C, struct ARegion *ar, struct BMEditMesh *em);
Modified: trunk/blender/source/blender/editors/include/ED_screen.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_screen.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/editors/include/ED_screen.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -71,7 +71,6 @@
/* spaces */
-void ED_spacetypes_init(void);
void ED_spacetypes_keymap(struct wmKeyConfig *keyconf);
int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco);
int ED_area_header_standardbuttons(const struct bContext *C, struct uiBlock *block, int yco);
Modified: trunk/blender/source/blender/editors/include/ED_space_api.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_space_api.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/editors/include/ED_space_api.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -34,6 +34,8 @@
struct ARegionType;
struct bContext;
+void ED_spacetypes_init(void);
+
/* the pluginnable API for export to editors */
/* calls for registering default spaces */
Modified: trunk/blender/source/blender/editors/mesh/mesh_intern.h
===================================================================
--- trunk/blender/source/blender/editors/mesh/mesh_intern.h 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/editors/mesh/mesh_intern.h 2013-03-11 20:27:38 UTC (rev 55198)
@@ -77,7 +77,6 @@
int EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop,
struct wmOperator *op, const int report);
-void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
void EDBM_stats_update(struct BMEditMesh *em);
/* ******************** editface.c */
Modified: trunk/blender/source/blender/editors/screen/area.c
===================================================================
--- trunk/blender/source/blender/editors/screen/area.c 2013-03-11 19:50:11 UTC (rev 55197)
+++ trunk/blender/source/blender/editors/screen/area.c 2013-03-11 20:27:38 UTC (rev 55198)
@@ -67,6 +67,8 @@
#include "screen_intern.h"
+extern void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3); /* xxx temp */
+
/* general area and region code */
static void region_draw_emboss(ARegion *ar, rcti *scirct)
@@ -245,8 +247,6 @@
static void region_draw_azone_tab_plus(AZone *az)
{
- extern void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3); /* xxx temp */
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list