forked from bartvdbraak/blender
Fix compiler warnings.
This commit is contained in:
parent
3469e623d3
commit
7a2e271e54
@ -404,7 +404,8 @@ void CLG_log_str(
|
||||
clg_str_append(&cstr, "\n");
|
||||
|
||||
/* could be optional */
|
||||
write(lg->ctx->output, cstr.data, cstr.len);
|
||||
ssize_t bytes_written = write(lg->ctx->output, cstr.data, cstr.len);
|
||||
(void)bytes_written;
|
||||
|
||||
clg_str_free(&cstr);
|
||||
|
||||
@ -435,7 +436,8 @@ void CLG_logf(
|
||||
clg_str_append(&cstr, "\n");
|
||||
|
||||
/* could be optional */
|
||||
write(lg->ctx->output, cstr.data, cstr.len);
|
||||
ssize_t bytes_written = write(lg->ctx->output, cstr.data, cstr.len);
|
||||
(void)bytes_written;
|
||||
|
||||
clg_str_free(&cstr);
|
||||
|
||||
|
@ -140,7 +140,10 @@ void create_swapped_rotation_matrix(
|
||||
rz = -euler[1];
|
||||
break;
|
||||
default:
|
||||
ry = 0.0f;
|
||||
rz = 0.0f;
|
||||
BLI_assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
unit_m3(rot_x_mat);
|
||||
|
@ -543,7 +543,7 @@ static void opensubdiv_evaluateQuadFaceGrids(CCGSubSurf *ss,
|
||||
for (S = 0; S < face->numVerts; S++) {
|
||||
int x, y, k;
|
||||
CCGEdge *edge = NULL;
|
||||
bool inverse_edge;
|
||||
bool inverse_edge = false;
|
||||
|
||||
for (x = 0; x < gridSize; x++) {
|
||||
for (y = 0; y < gridSize; y++) {
|
||||
|
@ -790,7 +790,9 @@ static void where_is_temp(char *fullname, char *basename, const size_t maxlen, c
|
||||
BLI_dir_create_recursive(tmp_name);
|
||||
}
|
||||
#else
|
||||
mkdtemp(tmp_name);
|
||||
if (mkdtemp(tmp_name) == NULL) {
|
||||
BLI_dir_create_recursive(tmp_name);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (BLI_is_dir(tmp_name)) {
|
||||
|
@ -846,8 +846,9 @@ static uiBut *uiItemFullO_ptr_ex(
|
||||
w = ui_text_icon_width(layout, name, icon, 0);
|
||||
|
||||
int prev_emboss = layout->emboss;
|
||||
if (flag & UI_ITEM_R_NO_BG)
|
||||
if (flag & UI_ITEM_R_NO_BG) {
|
||||
layout->emboss = UI_EMBOSS_NONE;
|
||||
}
|
||||
|
||||
/* create the button */
|
||||
if (icon) {
|
||||
@ -868,10 +869,9 @@ static uiBut *uiItemFullO_ptr_ex(
|
||||
if ((layout->root->type == UI_LAYOUT_TOOLBAR) && !icon)
|
||||
but->drawflag |= UI_BUT_TEXT_LEFT;
|
||||
|
||||
if (flag & UI_ITEM_R_NO_BG)
|
||||
if (flag & UI_ITEM_R_NO_BG) {
|
||||
layout->emboss = prev_emboss;
|
||||
|
||||
if (flag & UI_ITEM_R_NO_BG)
|
||||
}
|
||||
|
||||
if (flag & UI_ITEM_O_DEPRESS) {
|
||||
but->flag |= UI_SELECT_DRAW;
|
||||
@ -1501,8 +1501,9 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
|
||||
ui_item_rna_size(layout, name, icon, ptr, prop, index, icon_only, compact, &w, &h);
|
||||
|
||||
int prev_emboss = layout->emboss;
|
||||
if (flag & UI_ITEM_R_NO_BG)
|
||||
if (no_bg) {
|
||||
layout->emboss = UI_EMBOSS_NONE;
|
||||
}
|
||||
|
||||
/* array property */
|
||||
if (index == RNA_NO_INDEX && is_array)
|
||||
@ -1548,8 +1549,9 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
|
||||
UI_but_flag_enable(but, UI_BUT_LIST_ITEM);
|
||||
}
|
||||
|
||||
if (flag & UI_ITEM_R_NO_BG)
|
||||
if (no_bg) {
|
||||
layout->emboss = prev_emboss;
|
||||
}
|
||||
|
||||
/* ensure text isn't added to icon_only buttons */
|
||||
if (but && icon_only) {
|
||||
|
@ -333,7 +333,7 @@ static void validate_solution(LaplacianSystem *sys, short flag, float lambda, fl
|
||||
{
|
||||
int i;
|
||||
float lam;
|
||||
float vini, vend;
|
||||
float vini = 0.0f, vend = 0.0f;
|
||||
|
||||
if (flag & MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME) {
|
||||
vini = compute_volume(sys->vert_centroid, sys->vertexCos, sys->mpoly, sys->numPolys, sys->mloop);
|
||||
|
@ -634,9 +634,6 @@ static int pointdensity(PointDensity *pd,
|
||||
|
||||
texres->tin = 0.0f;
|
||||
|
||||
if ((!pd) || (!pd->point_tree))
|
||||
return 0;
|
||||
|
||||
init_pointdensityrangedata(pd, &pdr, &density, vec, &age, col,
|
||||
(pd->flag & TEX_PD_FALLOFF_CURVE ? pd->falloff_curve : NULL),
|
||||
pd->falloff_speed_scale * 0.001f);
|
||||
@ -694,9 +691,9 @@ static int pointdensity(PointDensity *pd,
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, const float vec[3], const float col[3])
|
||||
static void pointdensity_color(PointDensity *pd, TexResult *texres, float age, const float vec[3], const float col[3])
|
||||
{
|
||||
int retval = TEX_RGB;
|
||||
texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
|
||||
|
||||
if (pd->source == TEX_PD_PSYS) {
|
||||
float rgba[4];
|
||||
@ -733,8 +730,6 @@ static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, co
|
||||
break;
|
||||
case TEX_PD_COLOR_CONSTANT:
|
||||
default:
|
||||
texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
|
||||
retval = TEX_INT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -765,13 +760,9 @@ static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, co
|
||||
break;
|
||||
case TEX_PD_COLOR_CONSTANT:
|
||||
default:
|
||||
texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
|
||||
retval = TEX_INT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void sample_dummy_point_density(int resolution, float *values)
|
||||
@ -920,6 +911,10 @@ static void point_density_sample_func(
|
||||
PointDensity *pd = data->pd;
|
||||
float *values = data->values;
|
||||
|
||||
if (!pd || !pd->point_tree) {
|
||||
return;
|
||||
}
|
||||
|
||||
size_t z = (size_t)iter;
|
||||
for (size_t y = 0; y < resolution; ++y) {
|
||||
for (size_t x = 0; x < resolution; ++x) {
|
||||
|
Loading…
Reference in New Issue
Block a user