From c448196bb4c99b13cdaaf0e197a9f44a46b3bc18 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Apr 2015 10:30:14 +1000 Subject: Cleanup: warnings --- source/blender/blenkernel/intern/bpath.c | 2 +- source/blender/blenloader/intern/versioning_270.c | 4 ++-- source/blender/compositor/intern/COM_ExecutionGroup.cpp | 2 +- source/blender/editors/space_view3d/view3d_view.c | 2 +- source/blender/editors/transform/transform_conversions.c | 4 ++-- source/blender/modifiers/intern/MOD_correctivesmooth.c | 8 ++++---- source/blender/physics/intern/BPH_mass_spring.cpp | 2 +- source/blender/render/intern/source/pipeline.c | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 357e248c323..7c2b0a8a840 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -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) { /* 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; if (flag & BKE_BPATH_TRAVERSE_SKIP_MULTIFILE) { diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 1b91d3d869e..c8862870b92 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -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) { - cam->stereo.interocular_distance = 0.065; - cam->stereo.convergence_distance = 30.f * 0.065; + cam->stereo.interocular_distance = 0.065f; + cam->stereo.convergence_distance = 30.0f * 0.065f; } for (ima = main->image.first; ima; ima = ima->id.next) { diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index ca4f5c38f36..39ffa42e03c 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -402,7 +402,7 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo this->m_bTree->progress(this->m_bTree->prh, progress); 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_numberOfChunks); this->m_bTree->stats_draw(this->m_bTree->sdh, buf); diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 2de391c5163..529e5fcf756 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1289,7 +1289,7 @@ static bool view3d_localview_init( } if (rv3d->persp == RV3D_ORTHO) { - if (size < 0.0001) { + if (size < 0.0001f) { ok_dist = false; } } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 5750ba40afe..a5f247d7172 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3758,7 +3758,7 @@ static void createTransActionData(bContext *C, TransInfo *t) for (gpf_iter = gpl->frames.first; gpf_iter; gpf_iter = gpf->next) { if (gpf_iter->flag & GP_FRAME_SELECT) { 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) 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) { if (masklay_iter->flag & MASK_SHAPE_SELECT) { 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) min = val; } diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 82c1d6f2ec8..295f303974d 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -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 (csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) { 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; } } @@ -618,10 +618,10 @@ static void correctivesmooth_modifier_do( goto error; } 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) { - modifier_setError(md, "Original vertex count mismatch: %d to %d", me_numVerts, numVerts); + if (me_numVerts != numVerts) { + modifier_setError(md, "Original vertex count mismatch: %u to %u", me_numVerts, numVerts); goto error; } } diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp index e0ca945eaf7..9f6050527ef 100644 --- a/source/blender/physics/intern/BPH_mass_spring.cpp +++ b/source/blender/physics/intern/BPH_mass_spring.cpp @@ -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 epsilon2 = BLI_bvhtree_getepsilon(collmd->bvhtree); - float margin_distance = collpair->distance - epsilon2; + float margin_distance = (float)collpair->distance - epsilon2; float mag_v_rel; zero_v3(r_impulse); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index db3499b4180..24e66cbf3cb 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2248,9 +2248,9 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree) for (x = 0; x < re->rectx; x++, rf += 4, col += 4) { /* clamping to 1.0 is needed for correct AA */ - CLAMP(col[0], 0.0, 1.0f); - CLAMP(col[1], 0.0, 1.0f); - CLAMP(col[2], 0.0, 1.0f); + CLAMP(col[0], 0.0f, 1.0f); + CLAMP(col[1], 0.0f, 1.0f); + CLAMP(col[2], 0.0f, 1.0f); add_filt_fmask_coord(filt, col, rf, re->rectx, re->recty, x, y); } -- cgit v1.2.3