Cleanup: warnings

This commit is contained in:
2015-04-14 10:30:14 +10:00
parent af2f4724d5
commit c448196bb4
8 changed files with 15 additions and 15 deletions

View File

@@ -595,7 +595,7 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
} }
else if ((seq->type == SEQ_TYPE_IMAGE) && se) { else if ((seq->type == SEQ_TYPE_IMAGE) && se) {
/* might want an option not to loop over all strips */ /* might want an option not to loop over all strips */
unsigned int len = (unsigned int)MEM_allocN_len(se) / sizeof(*se); unsigned int len = (unsigned int)MEM_allocN_len(se) / (unsigned int)sizeof(*se);
unsigned int i; unsigned int i;
if (flag & BKE_BPATH_TRAVERSE_SKIP_MULTIFILE) { if (flag & BKE_BPATH_TRAVERSE_SKIP_MULTIFILE) {

View File

@@ -776,8 +776,8 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
} }
for (cam = main->camera.first; cam; cam = cam->id.next) { for (cam = main->camera.first; cam; cam = cam->id.next) {
cam->stereo.interocular_distance = 0.065; cam->stereo.interocular_distance = 0.065f;
cam->stereo.convergence_distance = 30.f * 0.065; cam->stereo.convergence_distance = 30.0f * 0.065f;
} }
for (ima = main->image.first; ima; ima = ima->id.next) { for (ima = main->image.first; ima; ima = ima->id.next) {

View File

@@ -402,7 +402,7 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
this->m_bTree->progress(this->m_bTree->prh, progress); this->m_bTree->progress(this->m_bTree->prh, progress);
char buf[128]; char buf[128];
BLI_snprintf(buf, sizeof(buf), "Compositing | Tile %d-%d", BLI_snprintf(buf, sizeof(buf), "Compositing | Tile %u-%u",
this->m_chunksFinished, this->m_chunksFinished,
this->m_numberOfChunks); this->m_numberOfChunks);
this->m_bTree->stats_draw(this->m_bTree->sdh, buf); this->m_bTree->stats_draw(this->m_bTree->sdh, buf);

View File

@@ -1289,7 +1289,7 @@ static bool view3d_localview_init(
} }
if (rv3d->persp == RV3D_ORTHO) { if (rv3d->persp == RV3D_ORTHO) {
if (size < 0.0001) { if (size < 0.0001f) {
ok_dist = false; ok_dist = false;
} }
} }

View File

@@ -3758,7 +3758,7 @@ static void createTransActionData(bContext *C, TransInfo *t)
for (gpf_iter = gpl->frames.first; gpf_iter; gpf_iter = gpf->next) { for (gpf_iter = gpl->frames.first; gpf_iter; gpf_iter = gpf->next) {
if (gpf_iter->flag & GP_FRAME_SELECT) { if (gpf_iter->flag & GP_FRAME_SELECT) {
if (FrameOnMouseSide(t->frame_side, (float)gpf_iter->framenum, cfra)) { if (FrameOnMouseSide(t->frame_side, (float)gpf_iter->framenum, cfra)) {
float val = fabs(gpf->framenum - gpf_iter->framenum); float val = fabsf(gpf->framenum - gpf_iter->framenum);
if (val < min) if (val < min)
min = val; min = val;
} }
@@ -3784,7 +3784,7 @@ static void createTransActionData(bContext *C, TransInfo *t)
for (masklay_iter = masklay->splines_shapes.first; masklay_iter; masklay_iter = masklay_iter->next) { for (masklay_iter = masklay->splines_shapes.first; masklay_iter; masklay_iter = masklay_iter->next) {
if (masklay_iter->flag & MASK_SHAPE_SELECT) { if (masklay_iter->flag & MASK_SHAPE_SELECT) {
if (FrameOnMouseSide(t->frame_side, (float)masklay_iter->frame, cfra)) { if (FrameOnMouseSide(t->frame_side, (float)masklay_iter->frame, cfra)) {
float val = fabs(masklay_shape->frame - masklay_iter->frame); float val = fabsf(masklay_shape->frame - masklay_iter->frame);
if (val < min) if (val < min)
min = val; min = val;
} }

View File

@@ -607,7 +607,7 @@ static void correctivesmooth_modifier_do(
/* If the number of verts has changed, the bind is invalid, so we do nothing */ /* If the number of verts has changed, the bind is invalid, so we do nothing */
if (csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) { if (csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) {
if (csmd->bind_coords_num != numVerts) { if (csmd->bind_coords_num != numVerts) {
modifier_setError(md, "Bind vertex count mismatch: %d to %d", csmd->bind_coords_num, numVerts); modifier_setError(md, "Bind vertex count mismatch: %u to %u", csmd->bind_coords_num, numVerts);
goto error; goto error;
} }
} }
@@ -618,10 +618,10 @@ static void correctivesmooth_modifier_do(
goto error; goto error;
} }
else { else {
int me_numVerts = (em) ? em->bm->totvert : ((Mesh *)ob->data)->totvert; unsigned int me_numVerts = (unsigned int)((em) ? em->bm->totvert : ((Mesh *)ob->data)->totvert);
if ((unsigned int)me_numVerts != numVerts) { if (me_numVerts != numVerts) {
modifier_setError(md, "Original vertex count mismatch: %d to %d", me_numVerts, numVerts); modifier_setError(md, "Original vertex count mismatch: %u to %u", me_numVerts, numVerts);
goto error; goto error;
} }
} }

View File

@@ -140,7 +140,7 @@ static bool collision_response(ClothModifierData *clmd, CollisionModifierData *c
float v1[3], v2_old[3], v2_new[3], v_rel_old[3], v_rel_new[3]; float v1[3], v2_old[3], v2_new[3], v_rel_old[3], v_rel_new[3];
float epsilon2 = BLI_bvhtree_getepsilon(collmd->bvhtree); float epsilon2 = BLI_bvhtree_getepsilon(collmd->bvhtree);
float margin_distance = collpair->distance - epsilon2; float margin_distance = (float)collpair->distance - epsilon2;
float mag_v_rel; float mag_v_rel;
zero_v3(r_impulse); zero_v3(r_impulse);

View File

@@ -2248,9 +2248,9 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
for (x = 0; x < re->rectx; x++, rf += 4, col += 4) { for (x = 0; x < re->rectx; x++, rf += 4, col += 4) {
/* clamping to 1.0 is needed for correct AA */ /* clamping to 1.0 is needed for correct AA */
CLAMP(col[0], 0.0, 1.0f); CLAMP(col[0], 0.0f, 1.0f);
CLAMP(col[1], 0.0, 1.0f); CLAMP(col[1], 0.0f, 1.0f);
CLAMP(col[2], 0.0, 1.0f); CLAMP(col[2], 0.0f, 1.0f);
add_filt_fmask_coord(filt, col, rf, re->rectx, re->recty, x, y); add_filt_fmask_coord(filt, col, rf, re->rectx, re->recty, x, y);
} }