[Bf-blender-cvs] [b13953b1f2d] master: Cleanup: quiet -Warray-parameter warnings from GCC11

Campbell Barton noreply at git.blender.org
Fri May 21 07:46:02 CEST 2021


Commit: b13953b1f2d83766ae20cb32ca8a89717a69c4c7
Author: Campbell Barton
Date:   Fri May 21 15:45:25 2021 +1000
Branches: master
https://developer.blender.org/rBb13953b1f2d83766ae20cb32ca8a89717a69c4c7

Cleanup: quiet -Warray-parameter warnings from GCC11

Some warnings remain that require larger changes.

===================================================================

M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/interface/interface_intern.h
M	source/blender/editors/sculpt_paint/paint_intern.h
M	source/blender/editors/transform/transform_orientations.c
M	source/blender/makesrna/intern/rna_armature.c
M	source/blender/makesrna/intern/rna_armature_api.c
M	source/blender/makesrna/intern/rna_curve_api.c
M	source/blender/makesrna/intern/rna_curveprofile.c
M	source/blender/makesrna/intern/rna_lattice_api.c
M	source/blender/makesrna/intern/rna_mesh_api.c
M	source/blender/makesrna/intern/rna_meta_api.c
M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/makesrna/intern/rna_object_api.c
M	source/blender/makesrna/intern/rna_pose_api.c
M	source/blender/makesrna/intern/rna_scene_api.c
M	source/blender/makesrna/intern/rna_tracking.c
M	source/blender/render/RE_engine.h
M	source/blender/render/intern/engine.c

===================================================================

diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 499f28beb60..66ec57c8a31 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -454,7 +454,7 @@ bool ED_view3d_calc_render_border(const struct Scene *scene,
                                   struct ARegion *region,
                                   struct rcti *rect);
 
-void ED_view3d_clipping_calc_from_boundbox(float clip[6][4],
+void ED_view3d_clipping_calc_from_boundbox(float clip[4][4],
                                            const struct BoundBox *clipbb,
                                            const bool is_flip);
 void ED_view3d_clipping_calc(struct BoundBox *bb,
@@ -690,7 +690,7 @@ float ED_view3d_grid_scale(const struct Scene *scene,
 void ED_view3d_grid_steps(const struct Scene *scene,
                           struct View3D *v3d,
                           struct RegionView3D *rv3d,
-                          float *r_grid_steps);
+                          float r_grid_steps[8]);
 float ED_view3d_grid_view_scale(struct Scene *scene,
                                 struct View3D *v3d,
                                 struct ARegion *region,
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 40a3f0d330f..23856c41ceb 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -934,9 +934,7 @@ extern void ui_but_execute_end(struct bContext *C,
                                void *active_back);
 extern void ui_but_active_free(const struct bContext *C, uiBut *but);
 extern int ui_but_menu_direction(uiBut *but);
-extern void ui_but_text_password_hide(char password_str[UI_MAX_DRAW_STR],
-                                      uiBut *but,
-                                      const bool restore);
+extern void ui_but_text_password_hide(char password_str[128], uiBut *but, const bool restore);
 extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction);
 bool ui_but_is_editing(const uiBut *but);
 float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2]);
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 3f5093222e9..7341d984c91 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -304,7 +304,7 @@ bool paint_curve_poll(struct bContext *C);
 
 bool facemask_paint_poll(struct bContext *C);
 void flip_v3_v3(float out[3], const float in[3], const enum ePaintSymmetryFlags symm);
-void flip_qt_qt(float out[3], const float in[3], const enum ePaintSymmetryFlags symm);
+void flip_qt_qt(float out[4], const float in[4], const enum ePaintSymmetryFlags symm);
 
 /* stroke operator */
 typedef enum BrushStrokeMode {
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index b3ed294845d..d97bcba161f 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -445,7 +445,7 @@ int BIF_countTransformOrientation(const bContext *C)
   return BLI_listbase_count(transform_orientations);
 }
 
-void applyTransformOrientation(const TransformOrientation *ts, float r_mat[3][3], char *r_name)
+void applyTransformOrientation(const TransformOrientation *ts, float r_mat[3][3], char r_name[64])
 {
   if (r_name) {
     BLI_strncpy(r_name, ts->name, MAX_NAME);
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index c54621372ba..c8fccfc27f8 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -674,7 +674,7 @@ static bool rna_Armature_is_editmode_get(PointerRNA *ptr)
   return (arm->edbo != NULL);
 }
 
-static void rna_Armature_transform(bArmature *arm, float *mat)
+static void rna_Armature_transform(bArmature *arm, float mat[16])
 {
   ED_armature_transform(arm, (const float(*)[4])mat, true);
 }
diff --git a/source/blender/makesrna/intern/rna_armature_api.c b/source/blender/makesrna/intern/rna_armature_api.c
index 36aa0401c7d..a02f55667e3 100644
--- a/source/blender/makesrna/intern/rna_armature_api.c
+++ b/source/blender/makesrna/intern/rna_armature_api.c
@@ -44,7 +44,7 @@ static void rna_EditBone_align_roll(EditBone *ebo, float no[3])
   ebo->roll = ED_armature_ebone_roll_to_vector(ebo, no, false);
 }
 
-static float rna_Bone_do_envelope(Bone *bone, float *vec)
+static float rna_Bone_do_envelope(Bone *bone, float vec[3])
 {
   float scale = (bone->flag & BONE_MULT_VG_ENV) == BONE_MULT_VG_ENV ? bone->weight : 1.0f;
   return distfactor_to_bone(vec,
@@ -56,11 +56,11 @@ static float rna_Bone_do_envelope(Bone *bone, float *vec)
 }
 
 static void rna_Bone_convert_local_to_pose(Bone *bone,
-                                           float *r_matrix,
-                                           float *matrix,
-                                           float *matrix_local,
-                                           float *parent_matrix,
-                                           float *parent_matrix_local,
+                                           float r_matrix[16],
+                                           float matrix[16],
+                                           float matrix_local[16],
+                                           float parent_matrix[16],
+                                           float parent_matrix_local[16],
                                            bool invert)
 {
   BoneParentTransform bpt;
@@ -89,14 +89,14 @@ static void rna_Bone_convert_local_to_pose(Bone *bone,
   BKE_bone_parent_transform_apply(&bpt, (float(*)[4])matrix, (float(*)[4])r_matrix);
 }
 
-static void rna_Bone_MatrixFromAxisRoll(float *axis, float roll, float *r_matrix)
+static void rna_Bone_MatrixFromAxisRoll(float axis[3], float roll, float r_matrix[9])
 {
   vec_roll_to_mat3(axis, roll, (float(*)[3])r_matrix);
 }
 
-static void rna_Bone_AxisRollFromMatrix(float *matrix,
-                                        float *axis_override,
-                                        float *r_axis,
+static void rna_Bone_AxisRollFromMatrix(float matrix[9],
+                                        float axis_override[3],
+                                        float r_axis[3],
                                         float *r_roll)
 {
   float mat[3][3];
diff --git a/source/blender/makesrna/intern/rna_curve_api.c b/source/blender/makesrna/intern/rna_curve_api.c
index 94fdb130026..beea607e8c0 100644
--- a/source/blender/makesrna/intern/rna_curve_api.c
+++ b/source/blender/makesrna/intern/rna_curve_api.c
@@ -35,7 +35,7 @@
 #include "rna_internal.h" /* own include */
 
 #ifdef RNA_RUNTIME
-static void rna_Curve_transform(Curve *cu, float *mat, bool shape_keys)
+static void rna_Curve_transform(Curve *cu, float mat[16], bool shape_keys)
 {
   BKE_curve_transform(cu, (const float(*)[4])mat, shape_keys, true);
 
diff --git a/source/blender/makesrna/intern/rna_curveprofile.c b/source/blender/makesrna/intern/rna_curveprofile.c
index bb54d55f8bd..b3ab8cc15a2 100644
--- a/source/blender/makesrna/intern/rna_curveprofile.c
+++ b/source/blender/makesrna/intern/rna_curveprofile.c
@@ -137,7 +137,7 @@ static void rna_CurveProfile_remove_point(CurveProfile *profile,
 static void rna_CurveProfile_evaluate(struct CurveProfile *profile,
                                       ReportList *reports,
                                       float length_portion,
-                                      float *location)
+                                      float location[2])
 {
   if (!profile->table) {
     BKE_report(reports, RPT_ERROR, "CurveProfile table not initialized, call initialize()");
diff --git a/source/blender/makesrna/intern/rna_lattice_api.c b/source/blender/makesrna/intern/rna_lattice_api.c
index 0b61603dd09..5b69a743d47 100644
--- a/source/blender/makesrna/intern/rna_lattice_api.c
+++ b/source/blender/makesrna/intern/rna_lattice_api.c
@@ -33,7 +33,7 @@
 #include "rna_internal.h" /* own include */
 
 #ifdef RNA_RUNTIME
-static void rna_Lattice_transform(Lattice *lt, float *mat, bool shape_keys)
+static void rna_Lattice_transform(Lattice *lt, float mat[16], bool shape_keys)
 {
   BKE_lattice_transform(lt, (float(*)[4])mat, shape_keys);
 
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index f92a2932f06..2b0582cae9a 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -172,7 +172,7 @@ static void rna_Mesh_normals_split_custom_set_from_vertices(Mesh *mesh,
   DEG_id_tag_update(&mesh->id, 0);
 }
 
-static void rna_Mesh_transform(Mesh *mesh, float *mat, bool shape_keys)
+static void rna_Mesh_transform(Mesh *mesh, float mat[16], bool shape_keys)
 {
   BKE_mesh_transform(mesh, (float(*)[4])mat, shape_keys);
 
diff --git a/source/blender/makesrna/intern/rna_meta_api.c b/source/blender/makesrna/intern/rna_meta_api.c
index 19d0b35959b..93bd9fe3b9c 100644
--- a/source/blender/makesrna/intern/rna_meta_api.c
+++ b/source/blender/makesrna/intern/rna_meta_api.c
@@ -35,7 +35,7 @@
 #include "rna_internal.h" /* own include */
 
 #ifdef RNA_RUNTIME
-static void rna_Meta_transform(struct MetaBall *mb, float *mat)
+static void rna_Meta_transform(struct MetaBall *mb, float mat[16])
 {
   BKE_mball_transform(mb, (float(*)[4])mat, true);
 
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 49abb892acc..c2512ea33ae 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -3133,7 +3133,7 @@ static void rna_NodeSocketStandard_draw(ID *id,
 }
 
 static void rna_NodeSocketStandard_draw_color(
-    ID *id, bNodeSocket *sock, struct bContext *C, PointerRNA *nodeptr, float *r_color)
+    ID *id, bNodeSocket *sock, struct bContext *C, PointerRNA *nodeptr, float r_color[4])
 {
   PointerRNA ptr;
   RNA_pointer_create(id, &RNA_NodeSocket, sock, &ptr);
@@ -315

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list