Quiet warnings

We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
This commit is contained in:
Julian Eisel
2015-09-04 01:04:37 +02:00
parent c3fef001ee
commit ef629e0d50
30 changed files with 53 additions and 49 deletions

View File

@@ -404,5 +404,7 @@ int GHOST_X11_GL_GetAttributes(
GHOST_ASSERT(i <= attribs_max, "attribute size too small"); GHOST_ASSERT(i <= attribs_max, "attribute size too small");
(void)attribs_max;
return i; return i;
} }

View File

@@ -2626,7 +2626,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
BevPoint *bevp, *bevp2, *bevp1 = NULL, *bevp0; BevPoint *bevp, *bevp2, *bevp1 = NULL, *bevp0;
const float treshold = 0.00001f; const float treshold = 0.00001f;
float min, inp; float min, inp;
float *seglen; float *seglen = NULL;
struct BevelSort *sortdata, *sd, *sd1; struct BevelSort *sortdata, *sd, *sd1;
int a, b, nr, poly, resolu = 0, len = 0, segcount; int a, b, nr, poly, resolu = 0, len = 0, segcount;
int *segbevcount; int *segbevcount;

View File

@@ -1600,7 +1600,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
float bottom_no[3] = {0.0f}; float bottom_no[3] = {0.0f};
float top_no[3] = {0.0f}; float top_no[3] = {0.0f};
float firstblend = 0.0f, lastblend = 0.0f; float firstblend = 0.0f, lastblend = 0.0f;
int i, start, steps; int i, start, steps = 0;
if (nu->flagu & CU_NURB_CYCLIC) { if (nu->flagu & CU_NURB_CYCLIC) {
calc_bevfac_mapping_default(bl, calc_bevfac_mapping_default(bl,

View File

@@ -2085,7 +2085,7 @@ static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh
int i, edge1_index, edge2_index, int i, edge1_index, edge2_index,
e1_index, e2_index, target_tri; e1_index, e2_index, target_tri;
float closest_point[2], lambda, dir_vec[2]; float closest_point[2], lambda, dir_vec[2];
int target_uv1, target_uv2, final_pixel[2], final_index; int target_uv1 = 0, target_uv2 = 0, final_pixel[2], final_index;
const float *s_uv1, *s_uv2, *t_uv1, *t_uv2; const float *s_uv1, *s_uv2, *t_uv1, *t_uv2;
@@ -3416,7 +3416,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
{ {
float proxDist = -1.0f; float proxDist = -1.0f;
float hitCo[3] = {0.0f, 0.0f, 0.0f}; float hitCo[3] = {0.0f, 0.0f, 0.0f};
int tri; int tri = 0;
/* if inverse prox and no hit found, skip this sample */ /* if inverse prox and no hit found, skip this sample */
if (inner_proximity && !hit_found) continue; if (inner_proximity && !hit_found) continue;

View File

@@ -397,7 +397,7 @@ static void emDM_calcLoopTangents(DerivedMesh *dm)
mesh2tangent.precomputedLoopNormals = tlnors; mesh2tangent.precomputedLoopNormals = tlnors;
mesh2tangent.looptris = em->looptris; mesh2tangent.looptris = em->looptris;
mesh2tangent.cd_loop_uv_offset = cd_loop_uv_offset; mesh2tangent.cd_loop_uv_offset = cd_loop_uv_offset;
mesh2tangent.orco = orco; mesh2tangent.orco = (const float (*)[3])orco;
mesh2tangent.tangent = tangent; mesh2tangent.tangent = tangent;
mesh2tangent.numTessFaces = totface; mesh2tangent.numTessFaces = totface;

View File

@@ -65,7 +65,7 @@ UvVertMap *BKE_mesh_uv_vert_map_create(
unsigned int a; unsigned int a;
int i, totuv, nverts; int i, totuv, nverts;
bool *winding; bool *winding = NULL;
BLI_buffer_declare_static(vec2f, tf_uv_buf, BLI_BUFFER_NOP, 32); BLI_buffer_declare_static(vec2f, tf_uv_buf, BLI_BUFFER_NOP, 32);
totuv = 0; totuv = 0;
@@ -94,7 +94,7 @@ UvVertMap *BKE_mesh_uv_vert_map_create(
mp = mpoly; mp = mpoly;
for (a = 0; a < totpoly; a++, mp++) { for (a = 0; a < totpoly; a++, mp++) {
if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL))) { if (!selected || (!(mp->flag & ME_HIDE) && (mp->flag & ME_FACE_SEL))) {
float (*tf_uv)[2]; float (*tf_uv)[2] = NULL;
if (use_winding) { if (use_winding) {
tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, mp->totloop); tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, mp->totloop);

View File

@@ -2383,9 +2383,9 @@ static void ccgDM_buffer_copy_edge(
/* part one, handle all normal edges */ /* part one, handle all normal edges */
for (j = 0; j < totedge; j++) { for (j = 0; j < totedge; j++) {
CCGFace *f; CCGFace *f;
int fhandle; int fhandle = 0;
int totvert; int totvert = 0;
unsigned int S; unsigned int S = 0;
CCGEdge *e = ccgdm->edgeMap[j].edge; CCGEdge *e = ccgdm->edgeMap[j].edge;
bool isloose = !ccgSubSurf_getEdgeNumFaces(e); bool isloose = !ccgSubSurf_getEdgeNumFaces(e);

View File

@@ -570,7 +570,7 @@ static int recursive_operation(const char *startfrom, const char *startto,
char *from_path = NULL, *to_path = NULL; char *from_path = NULL, *to_path = NULL;
struct dirent **dirlist = NULL; struct dirent **dirlist = NULL;
size_t from_alloc_len = -1, to_alloc_len = -1; size_t from_alloc_len = -1, to_alloc_len = -1;
int i, n, ret = 0; int i, n = 0, ret = 0;
do { /* once */ do { /* once */
/* ensure there's no trailing slash in file path */ /* ensure there's no trailing slash in file path */

View File

@@ -228,7 +228,7 @@ static void bm_grid_fill_array(
unsigned int x, y; unsigned int x, y;
/* for use_loop_interp */ /* for use_loop_interp */
BMLoop *((*larr_x_a)[2]), *((*larr_x_b)[2]), *((*larr_y_a)[2]), *((*larr_y_b)[2]); BMLoop *((*larr_x_a)[2]) = NULL, *((*larr_x_b)[2]) = NULL, *((*larr_y_a)[2]) = NULL, *((*larr_y_b)[2]) = NULL;
float (*weight_table)[4]; float (*weight_table)[4];

View File

@@ -276,7 +276,7 @@ static void bmo_face_inset_individual(
BMLoop *l_iter, *l_first; BMLoop *l_iter, *l_first;
BMLoop *l_other; BMLoop *l_other;
unsigned int i; unsigned int i;
float e_length_prev; float e_length_prev = 0.0f;
l_first = BM_FACE_FIRST_LOOP(f); l_first = BM_FACE_FIRST_LOOP(f);

View File

@@ -787,7 +787,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op)
BLI_array_declare(verts); BLI_array_declare(verts);
float smooth, fractal, along_normal; float smooth, fractal, along_normal;
bool use_sphere, use_single_edge, use_grid_fill, use_only_quads; bool use_sphere, use_single_edge, use_grid_fill, use_only_quads;
int cornertype, seed, i, j, a, b, numcuts, totesel, smooth_falloff; int cornertype, seed, i, j, a, b = 0, numcuts, totesel, smooth_falloff;
BMO_slot_buffer_flag_enable(bm, op->slots_in, "edges", BM_EDGE, SUBD_SPLIT); BMO_slot_buffer_flag_enable(bm, op->slots_in, "edges", BM_EDGE, SUBD_SPLIT);

View File

@@ -491,8 +491,8 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op)
BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) { BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) {
if (use_ccw == false) { /* same loops direction */ if (use_ccw == false) { /* same loops direction */
BMLoop *lf; /* current face loops */ BMLoop *lf; /* current face loops */
MLoopUV *f_luv; /* first face loop uv */ MLoopUV *f_luv = NULL; /* first face loop uv */
float p_uv[2]; /* previous uvs */ float p_uv[2] = {0.0f, 0.0f}; /* previous uvs */
float t_uv[2]; /* tmp uvs */ float t_uv[2]; /* tmp uvs */
int n = 0; int n = 0;
@@ -516,8 +516,8 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op)
else { /* counter loop direction */ else { /* counter loop direction */
BMLoop *lf; /* current face loops */ BMLoop *lf; /* current face loops */
MLoopUV *p_luv; /* previous loop uv */ MLoopUV *p_luv; /* previous loop uv */
MLoopUV *luv; MLoopUV *luv = NULL;
float t_uv[2]; /* current uvs */ float t_uv[2] = {0.0f, 0.0f}; /* current uvs */
int n = 0; int n = 0;
BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) { BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
@@ -594,7 +594,7 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op)
BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) { BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) {
if (use_ccw == false) { /* same loops direction */ if (use_ccw == false) { /* same loops direction */
BMLoop *lf; /* current face loops */ BMLoop *lf; /* current face loops */
MLoopCol *f_lcol; /* first face loop color */ MLoopCol *f_lcol = NULL; /* first face loop color */
MLoopCol p_col; /* previous color */ MLoopCol p_col; /* previous color */
MLoopCol t_col; /* tmp color */ MLoopCol t_col; /* tmp color */
@@ -619,7 +619,7 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op)
else { /* counter loop direction */ else { /* counter loop direction */
BMLoop *lf; /* current face loops */ BMLoop *lf; /* current face loops */
MLoopCol *p_lcol; /* previous loop color */ MLoopCol *p_lcol; /* previous loop color */
MLoopCol *lcol; MLoopCol *lcol = NULL;
MLoopCol t_col; /* current color */ MLoopCol t_col; /* current color */
int n = 0; int n = 0;

View File

@@ -4032,7 +4032,7 @@ static float find_superellipse_chord_u(float u0, float d2goal, float r)
* Return the u's in *r_params, which should point to an array of size n+1. */ * Return the u's in *r_params, which should point to an array of size n+1. */
static void find_even_superellipse_params(int n, float r, float *r_params) static void find_even_superellipse_params(int n, float r, float *r_params)
{ {
float d2low, d2high, d2, d2final, u; float d2low, d2high, d2 = 0.0f, d2final, u;
int i, j, n2; int i, j, n2;
const int maxiters = 40; const int maxiters = 40;
const float d2tol = 1e-6f; const float d2tol = 1e-6f;

View File

@@ -1000,7 +1000,7 @@ bool BM_mesh_intersect(
if (BM_vert_in_edge(e, v_prev)) { if (BM_vert_in_edge(e, v_prev)) {
v_prev = BM_edge_split(bm, e, v_prev, NULL, CLAMPIS(fac, 0.0f, 1.0f)); v_prev = BM_edge_split(bm, e, v_prev, NULL, CLAMPIS(fac, 0.0f, 1.0f));
BLI_assert( BM_vert_in_edge(e, v_end)); BLI_assert(BM_vert_in_edge(e, v_end));
if (!BM_edge_exists(v_prev, vi) && if (!BM_edge_exists(v_prev, vi) &&
!BM_vert_splice_check_double(v_prev, vi) && !BM_vert_splice_check_double(v_prev, vi) &&
@@ -1017,6 +1017,7 @@ bool BM_mesh_intersect(
} }
} }
} }
UNUSED_VARS_NDEBUG(v_end);
} }
} }
#endif #endif

View File

@@ -1579,7 +1579,7 @@ static void curve_select_shortest_path_surf(Nurb *nu, int vert_src, int vert_dst
{ {
Heap *heap; Heap *heap;
int i, vert_curr; int i, vert_curr = 0;
int totu = nu->pntsu; int totu = nu->pntsu;
int totv = nu->pntsv; int totv = nu->pntsv;
@@ -1725,4 +1725,4 @@ void CURVE_OT_shortest_path_pick(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
} }
/** \} */ /** \} */

View File

@@ -74,7 +74,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C,
MaskSplinePoint *point = NULL; MaskSplinePoint *point = NULL;
float dist_best_sq = FLT_MAX, co[2]; float dist_best_sq = FLT_MAX, co[2];
int width, height; int width, height;
float u; float u = 0.0f;
float scalex, scaley; float scalex, scaley;
ED_mask_get_size(sa, &width, &height); ED_mask_get_size(sa, &width, &height);

View File

@@ -516,7 +516,7 @@ static bool spline_under_mouse_get(const bContext *C,
MaskLayer *mask_layer; MaskLayer *mask_layer;
int width, height; int width, height;
float pixel_co[2]; float pixel_co[2];
float closest_dist_squared; float closest_dist_squared = 0.0f;
MaskLayer *closest_layer = NULL; MaskLayer *closest_layer = NULL;
MaskSpline *closest_spline = NULL; MaskSpline *closest_spline = NULL;
bool undistort = false; bool undistort = false;
@@ -2209,7 +2209,7 @@ static int mask_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
} }
if (end >= start) { if (end >= start) {
int tot_point; int tot_point;
int tot_point_shape_start; int tot_point_shape_start = 0;
MaskSpline *new_spline = BKE_mask_spline_add(mask_layer); MaskSpline *new_spline = BKE_mask_spline_add(mask_layer);
MaskSplinePoint *new_point; MaskSplinePoint *new_point;
int b; int b;

View File

@@ -668,7 +668,7 @@ UvVertMap *BM_uv_vert_map_create(
BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, a) { BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, a) {
if ((use_select == false) || BM_elem_flag_test(efa, BM_ELEM_SELECT)) { if ((use_select == false) || BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
float (*tf_uv)[2]; float (*tf_uv)[2] = NULL;
if (use_winding) { if (use_winding) {
tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, efa->len); tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, efa->len);
@@ -779,7 +779,7 @@ UvElementMap *BM_uv_element_map_create(
/* vars from original func */ /* vars from original func */
UvElementMap *element_map; UvElementMap *element_map;
UvElement *buf; UvElement *buf;
bool *winding; bool *winding = NULL;
BLI_buffer_declare_static(vec2f, tf_uv_buf, BLI_BUFFER_NOP, BM_DEFAULT_NGON_STACK_SIZE); BLI_buffer_declare_static(vec2f, tf_uv_buf, BLI_BUFFER_NOP, BM_DEFAULT_NGON_STACK_SIZE);
MLoopUV *luv; MLoopUV *luv;
@@ -820,7 +820,7 @@ UvElementMap *BM_uv_element_map_create(
} }
if (!selected || BM_elem_flag_test(efa, BM_ELEM_SELECT)) { if (!selected || BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
float (*tf_uv)[2]; float (*tf_uv)[2] = NULL;
if (use_winding) { if (use_winding) {
tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, efa->len); tf_uv = (float (*)[2])BLI_buffer_resize_data(&tf_uv_buf, vec2f, efa->len);

View File

@@ -563,7 +563,7 @@ static int bake(
Object *ob_cage = NULL; Object *ob_cage = NULL;
BakeHighPolyData *highpoly = NULL; BakeHighPolyData *highpoly = NULL;
int tot_highpoly; int tot_highpoly = 0;
char restrict_flag_low = ob_low->restrictflag; char restrict_flag_low = ob_low->restrictflag;
char restrict_flag_cage = 0; char restrict_flag_cage = 0;

View File

@@ -1591,7 +1591,7 @@ void paint_2d_gradient_fill(
if (do_float) { if (do_float) {
for (x_px = 0; x_px < ibuf->x; x_px++) { for (x_px = 0; x_px < ibuf->x; x_px++) {
for (y_px = 0; y_px < ibuf->y; y_px++) { for (y_px = 0; y_px < ibuf->y; y_px++) {
float f; float f = 0.0f;
float p[2] = {x_px - image_init[0], y_px - image_init[1]}; float p[2] = {x_px - image_init[0], y_px - image_init[1]};
switch (br->gradient_fill_mode) { switch (br->gradient_fill_mode) {
@@ -1619,7 +1619,7 @@ void paint_2d_gradient_fill(
else { else {
for (x_px = 0; x_px < ibuf->x; x_px++) { for (x_px = 0; x_px < ibuf->x; x_px++) {
for (y_px = 0; y_px < ibuf->y; y_px++) { for (y_px = 0; y_px < ibuf->y; y_px++) {
float f; float f = 0.0f;
float p[2] = {x_px - image_init[0], y_px - image_init[1]}; float p[2] = {x_px - image_init[0], y_px - image_init[1]};
switch (br->gradient_fill_mode) { switch (br->gradient_fill_mode) {

View File

@@ -2695,7 +2695,7 @@ static void project_paint_face_init(
interp_v3_v3v3(edge_verts_inset_clip[1], insetCos[fidx1], insetCos[fidx2], fac2); interp_v3_v3v3(edge_verts_inset_clip[1], insetCos[fidx1], insetCos[fidx2], fac2);
if (pixel_bounds_uv(seam_subsection, &bounds_px, ibuf->x, ibuf->y)) { if (pixel_bounds_uv((const float (*)[2])seam_subsection, &bounds_px, ibuf->x, ibuf->y)) {
/* bounds between the seam rect and the uvspace bucket pixels */ /* bounds between the seam rect and the uvspace bucket pixels */
has_isect = 0; has_isect = 0;
@@ -4458,7 +4458,7 @@ static void *do_projectpaint_thread(void *ph_v)
/* these could probably be cached instead of being done per pixel */ /* these could probably be cached instead of being done per pixel */
float tangent[2]; float tangent[2];
float line_len_sq_inv, line_len; float line_len_sq_inv, line_len;
float f; float f = 0.0f;
float color_f[4]; float color_f[4];
float p[2] = {projPixel->projCoSS[0] - lastpos[0], projPixel->projCoSS[1] - lastpos[1]}; float p[2] = {projPixel->projCoSS[0] - lastpos[0], projPixel->projCoSS[1] - lastpos[1]};
@@ -4586,7 +4586,7 @@ static void *do_projectpaint_thread(void *ph_v)
falloff = BKE_brush_curve_strength_clamped(ps->brush, dist, brush_radius); falloff = BKE_brush_curve_strength_clamped(ps->brush, dist, brush_radius);
if (falloff > 0.0f) { if (falloff > 0.0f) {
float texrgb[3]; float texrgb[3] = {0.0f, 0.0f, 0.0f};
float mask; float mask;
if (ps->do_masking) { if (ps->do_masking) {

View File

@@ -2156,7 +2156,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
float paintweight; float paintweight;
int *indexar; int *indexar;
float totw; float totw;
unsigned int index, totindex; unsigned int index, totindex = 0;
float alpha; float alpha;
float mval[2]; float mval[2];
bool use_vert_sel; bool use_vert_sel;

View File

@@ -453,7 +453,7 @@ static void text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int x,
{ {
const bool use_syntax = (st->showsyntax && format); const bool use_syntax = (st->showsyntax && format);
FlattenString fs; FlattenString fs;
int columns, size, n, w = 0, padding, amount = 0; int columns, size, n, w = 0, padding = 0, amount = 0;
const char *in = NULL; const char *in = NULL;
for (n = flatten_string(st, &fs, str), str = fs.buf; n > 0; n--) { for (n = flatten_string(st, &fs, str), str = fs.buf; n > 0; n--) {

View File

@@ -1119,7 +1119,7 @@ static void createTransArmatureVerts(TransInfo *t)
bool mirror = ((arm->flag & ARM_MIRROR_EDIT) != 0); bool mirror = ((arm->flag & ARM_MIRROR_EDIT) != 0);
int total_mirrored = 0, i; int total_mirrored = 0, i;
int oldtot; int oldtot;
BoneInitData *bid; BoneInitData *bid = NULL;
t->total = 0; t->total = 0;
for (ebo = edbo->first; ebo; ebo = ebo->next) { for (ebo = edbo->first; ebo; ebo = ebo->next) {

View File

@@ -2163,8 +2163,8 @@ static bool peelDerivedMesh(
if (data.bvhdata.tree != NULL) { if (data.bvhdata.tree != NULL) {
data.ob = ob; data.ob = ob;
data.obmat = obmat; data.obmat = (const float (*)[4])obmat;
data.timat = timat; data.timat = (const float (*)[3])timat;
data.ray_start = ray_start; data.ray_start = ray_start;
data.looptri = looptri; data.looptri = looptri;
data.polynors = dm->getPolyDataArray(dm, CD_NORMAL); /* can be NULL */ data.polynors = dm->getPolyDataArray(dm, CD_NORMAL); /* can be NULL */

View File

@@ -718,7 +718,7 @@ static char *code_generate_vertex(ListBase *nodes, const GPUMatType type)
GPUNode *node; GPUNode *node;
GPUInput *input; GPUInput *input;
char *code; char *code;
char *vertcode; char *vertcode = NULL;
for (node = nodes->first; node; node = node->next) { for (node = nodes->first; node; node = node->next) {
for (input = node->inputs.first; input; input = input->next) { for (input = node->inputs.first; input; input = input->next) {

View File

@@ -235,7 +235,8 @@ static void displaceModifier_do(
clnors = CustomData_get_layer(ldata, CD_NORMAL); clnors = CustomData_get_layer(ldata, CD_NORMAL);
vert_clnors = MEM_mallocN(sizeof(*vert_clnors) * (size_t)numVerts, __func__); vert_clnors = MEM_mallocN(sizeof(*vert_clnors) * (size_t)numVerts, __func__);
BKE_mesh_normals_loop_to_vertex(numVerts, dm->getLoopArray(dm), dm->getNumLoops(dm), clnors, vert_clnors); BKE_mesh_normals_loop_to_vertex(numVerts, dm->getLoopArray(dm), dm->getNumLoops(dm),
(const float (*)[3])clnors, vert_clnors);
} }
else { else {
direction = MOD_DISP_DIR_NOR; direction = MOD_DISP_DIR_NOR;

View File

@@ -176,7 +176,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
MLoopUV **mloopuv_layers = BLI_array_alloca(mloopuv_layers, mloopuv_layers_tot); MLoopUV **mloopuv_layers = BLI_array_alloca(mloopuv_layers, mloopuv_layers_tot);
float uv_u_scale; float uv_u_scale;
float uv_v_minmax[2] = {FLT_MAX, -FLT_MAX}; float uv_v_minmax[2] = {FLT_MAX, -FLT_MAX};
float uv_v_range_inv; float uv_v_range_inv = 0.0f;
float uv_axis_plane[4]; float uv_axis_plane[4];
char axis_char = 'X'; char axis_char = 'X';
@@ -196,7 +196,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
unsigned int edge_offset; unsigned int edge_offset;
MPoly *mpoly_orig, *mpoly_new, *mp_new; MPoly *mpoly_orig = NULL, *mpoly_new, *mp_new;
MLoop *mloop_orig, *mloop_new, *ml_new; MLoop *mloop_orig, *mloop_new, *ml_new;
MEdge *medge_orig, *med_orig, *med_new, *med_new_firstloop, *medge_new; MEdge *medge_orig, *med_orig, *med_new, *med_new_firstloop, *medge_new;
MVert *mvert_new, *mvert_orig, *mv_orig, *mv_new, *mv_new_base; MVert *mvert_new, *mvert_orig, *mv_orig, *mv_new, *mv_new_base;
@@ -877,7 +877,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
const unsigned int step_last = step_tot - (close ? 1 : 2); const unsigned int step_last = step_tot - (close ? 1 : 2);
const unsigned int mpoly_index_orig = totpoly ? edge_poly_map[i] : UINT_MAX; const unsigned int mpoly_index_orig = totpoly ? edge_poly_map[i] : UINT_MAX;
const bool has_mpoly_orig = (mpoly_index_orig != UINT_MAX); const bool has_mpoly_orig = (mpoly_index_orig != UINT_MAX);
float uv_v_offset_a, uv_v_offset_b; float uv_v_offset_a = 0.0f, uv_v_offset_b = 0.0f;
const unsigned int mloop_index_orig[2] = { const unsigned int mloop_index_orig[2] = {
vert_loop_map ? vert_loop_map[medge_new[i].v1] : UINT_MAX, vert_loop_map ? vert_loop_map[medge_new[i].v1] : UINT_MAX,

View File

@@ -277,7 +277,7 @@ static void py_bvhtree_raycast_cb(void *userdata, int index, const BVHTreeRay *r
{ {
const PyBVHTree *self = userdata; const PyBVHTree *self = userdata;
const float (*coords)[3] = self->coords; const float (*coords)[3] = (const float (*)[3])self->coords;
const unsigned int *tri = self->tris[index]; const unsigned int *tri = self->tris[index];
const float *tri_co[3] = {coords[tri[0]], coords[tri[1]], coords[tri[2]]}; const float *tri_co[3] = {coords[tri[0]], coords[tri[1]], coords[tri[2]]};
float dist; float dist;
@@ -306,7 +306,7 @@ static void py_bvhtree_nearest_point_cb(void *userdata, int index, const float c
{ {
PyBVHTree *self = userdata; PyBVHTree *self = userdata;
const float (*coords)[3] = self->coords; const float (*coords)[3] = (const float (*)[3])self->coords;
const unsigned int *tri = self->tris[index]; const unsigned int *tri = self->tris[index];
const float *tri_co[3] = {coords[tri[0]], coords[tri[1]], coords[tri[2]]}; const float *tri_co[3] = {coords[tri[0]], coords[tri[1]], coords[tri[2]]};
float nearest_tmp[3], dist_sq; float nearest_tmp[3], dist_sq;

View File

@@ -4448,7 +4448,7 @@ static void radial_control_cancel(bContext *C, wmOperator *op)
static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *event) static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *event)
{ {
RadialControl *rc = op->customdata; RadialControl *rc = op->customdata;
float new_value, dist, zoom[2]; float new_value, dist = 0.0f, zoom[2];
float delta[2], ret = OPERATOR_RUNNING_MODAL; float delta[2], ret = OPERATOR_RUNNING_MODAL;
bool snap; bool snap;
float angle_precision = 0.0f; float angle_precision = 0.0f;