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
path: root/source
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-10-25 18:31:46 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-10-25 18:57:05 +0300
commit046a99d5807000e9015119399a8483ba381917bb (patch)
tree55d802d8367675d5d51aa112345584cb328f065d /source
parent08a1492ae53fb1575cffb0d11fa3c7e5bdc80b3a (diff)
Cleanup: silence warnings
``` warning: assignment discards ‘const’ qualifier from pointer target warning: declaration of ‘co’ shadows a parameter ```
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_immediate_util.c17
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c4
2 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c
index d848ea09a2a..aeed03080a3 100644
--- a/source/blender/gpu/intern/gpu_immediate_util.c
+++ b/source/blender/gpu/intern/gpu_immediate_util.c
@@ -441,16 +441,19 @@ void imm_draw_cube_corners_3d(uint pos,
immBegin(GPU_PRIM_LINES, ARRAY_SIZE(cube_line_index) * 4);
for (int i = 0; i < ARRAY_SIZE(cube_line_index); i++) {
- float vec[3], co[3];
+ float vec[3], _co[3];
sub_v3_v3v3(vec, coords[cube_line_index[i][1]], coords[cube_line_index[i][0]]);
mul_v3_fl(vec, factor);
- immVertex3fv(pos, coords[cube_line_index[i][0]]);
- add_v3_v3v3(co, coords[cube_line_index[i][0]], vec);
- immVertex3fv(pos, co);
- sub_v3_v3v3(co, coords[cube_line_index[i][1]], vec);
- immVertex3fv(pos, co);
- immVertex3fv(pos, coords[cube_line_index[i][1]]);
+ copy_v3_v3(_co, coords[cube_line_index[i][0]]);
+ immVertex3fv(pos, _co);
+ add_v3_v3(_co, vec);
+ immVertex3fv(pos, _co);
+
+ copy_v3_v3(_co, coords[cube_line_index[i][1]]);
+ immVertex3fv(pos, _co);
+ sub_v3_v3(_co, vec);
+ immVertex3fv(pos, _co);
}
immEnd();
}
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index f78bd528c5e..c60e47a3b0f 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -711,7 +711,7 @@ static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const
int iconsize = UI_DPI_ICON_SIZE;
int padding = 4 * UI_DPI_FAC;
- char *tooltip = NULL;
+ const char *tooltip = NULL;
bool free_tooltip = false;
if (UI_but_active_drop_name(C)) {
tooltip = IFACE_("Paste name");
@@ -747,7 +747,7 @@ static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const
wm_drop_operator_draw(tooltip, x, y);
if (free_tooltip) {
- MEM_freeN(tooltip);
+ MEM_freeN((void *)tooltip);
}
}
}