[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39794] trunk/blender/source/blender: fix for some warnings with the recent merge, also tag unused args.

Campbell Barton ideasman42 at gmail.com
Tue Aug 30 11:50:31 CEST 2011


Revision: 39794
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39794
Author:   campbellbarton
Date:     2011-08-30 09:50:31 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
fix for some warnings with the recent merge, also tag unused args.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c
    trunk/blender/source/blender/blenlib/intern/BLI_kdtree.c
    trunk/blender/source/blender/blenlib/intern/graph.c
    trunk/blender/source/blender/editors/animation/anim_channels_defines.c
    trunk/blender/source/blender/editors/animation/anim_channels_edit.c
    trunk/blender/source/blender/editors/animation/anim_filter.c
    trunk/blender/source/blender/editors/armature/poseSlide.c
    trunk/blender/source/blender/editors/armature/poseobject.c
    trunk/blender/source/blender/editors/object/object_select.c
    trunk/blender/source/blender/editors/space_graph/graph_draw.c
    trunk/blender/source/blender/editors/space_nla/nla_edit.c
    trunk/blender/source/blender/editors/space_outliner/outliner_tools.c
    trunk/blender/source/blender/editors/space_view3d/drawobject.c
    trunk/blender/source/blender/imbuf/CMakeLists.txt
    trunk/blender/source/blender/imbuf/intern/indexer_dv.c

Modified: trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -1494,7 +1494,7 @@
 	float t2z = (bv[data->index[5]] - data->ray.origin[2]) * data->idot_axis[2];
 
 	if(t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return FLT_MAX;
-	if(t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return FLT_MAX;
+	if(t2x < 0.0f || t2y < 0.0f || t2z < 0.0f) return FLT_MAX;
 	if(t1x > data->hit.dist || t1y > data->hit.dist || t1z > data->hit.dist) return FLT_MAX;
 
 	dist = t1x;
@@ -1599,11 +1599,11 @@
 		data.ray_dot_axis[i] = INPR( data.ray.direction, KDOP_AXES[i]);
 		data.idot_axis[i] = 1.0f / data.ray_dot_axis[i];
 
-		if(fabs(data.ray_dot_axis[i]) < FLT_EPSILON)
+		if(fabsf(data.ray_dot_axis[i]) < FLT_EPSILON)
 		{
 			data.ray_dot_axis[i] = 0.0;
 		}
-		data.index[2*i] = data.idot_axis[i] < 0.0 ? 1 : 0;
+		data.index[2*i] = data.idot_axis[i] < 0.0f ? 1 : 0;
 		data.index[2*i+1] = 1 - data.index[2*i];
 		data.index[2*i]	  += 2*i;
 		data.index[2*i+1] += 2*i;
@@ -1654,7 +1654,7 @@
 	
 	dist = ray_nearest_hit(&data, bv);
 	
-	if(dist > 0.0)
+	if(dist > 0.0f)
 	{
 		VECADDFAC(pos, light_start, data.ray.direction, dist);
 	}

Modified: trunk/blender/source/blender/blenlib/intern/BLI_kdtree.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_kdtree.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/blenlib/intern/BLI_kdtree.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -187,7 +187,7 @@
 
 		cur_dist = node->co[node->d] - co[node->d];
 
-		if(cur_dist<0.0){
+		if(cur_dist<0.0f){
 			cur_dist= -cur_dist*cur_dist;
 
 			if(-cur_dist<min_dist){
@@ -294,7 +294,7 @@
 
 		cur_dist = node->co[node->d] - co[node->d];
 
-		if(cur_dist<0.0){
+		if(cur_dist<0.0f){
 			cur_dist= -cur_dist*cur_dist;
 
 			if(found<n || -cur_dist<nearest[found-1].dist){

Modified: trunk/blender/source/blender/blenlib/intern/graph.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/graph.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/blenlib/intern/graph.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -714,7 +714,7 @@
 		int dispatch = 0;
 		int last = i - 1;
 		
-		if (fabs(ring[first].arc->length - ring[i].arc->length) > limit)
+		if (fabsf(ring[first].arc->length - ring[i].arc->length) > limit)
 		{
 			dispatch = 1;
 		}

Modified: trunk/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -1273,7 +1273,7 @@
 
 /* offset for texture expanders */
 // FIXME: soon to be obsolete?
-static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *ale)
+static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale))
 {
 	return 14; // XXX: simply include this in indention instead?
 }

Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -2018,7 +2018,7 @@
 	ED_region_tag_redraw(ac->ar);
 }
 
-static int animchannels_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+static int animchannels_rename_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *evt)
 {
 	bAnimContext ac;
 	ARegion *ar;

Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -990,7 +990,7 @@
 	return items;
 }
 
-static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *act, bActionGroup *agrp, int filter_mode, ID *owner_id)
+static size_t animfilter_act_group (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, bAction *UNUSED(act), bActionGroup *agrp, int filter_mode, ID *owner_id)
 {
 	ListBase tmp_data = {NULL, NULL};
 	size_t tmp_items = 0;

Modified: trunk/blender/source/blender/editors/armature/poseSlide.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poseSlide.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/armature/poseSlide.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -520,7 +520,7 @@
 /* ------------------------------------ */
 
 /* draw percentage indicator in header */
-static void pose_slide_draw_status (bContext *C, tPoseSlideOp *pso)
+static void pose_slide_draw_status (tPoseSlideOp *pso)
 {
 	char statusStr[32];
 	char mode[32];
@@ -615,7 +615,7 @@
 	WM_cursor_modal(win, BC_EW_SCROLLCURSOR);
 	
 	/* header print */
-	pose_slide_draw_status(C, pso);
+	pose_slide_draw_status(pso);
 	
 	/* add a modal handler for this operator */
 	WM_event_add_modal_handler(C, op);
@@ -672,7 +672,7 @@
 			RNA_float_set(op->ptr, "percentage", pso->percentage);
 			
 			/* update percentage indicator in header */
-			pose_slide_draw_status(C, pso);
+			pose_slide_draw_status(pso);
 			
 			/* reset transforms (to avoid accumulation errors) */
 			pose_slide_reset(pso);

Modified: trunk/blender/source/blender/editors/armature/poseobject.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poseobject.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/armature/poseobject.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -1611,7 +1611,7 @@
 	return strcmp(sgrp_a->agrp->name, sgrp_b->agrp->name);
 }
 
-static int group_sort_exec(bContext *C, wmOperator *op)
+static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
 {
 	Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
 	bPose *pose= (ob) ? ob->pose : NULL;
@@ -2275,7 +2275,7 @@
 /* ********************************************** */
 /* Clear User Transforms */
 
-static int pose_clear_user_transforms_exec (bContext *C, wmOperator *op)
+static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
 {
 	Scene *scene = CTX_data_scene(C);
 	Object *ob = CTX_data_active_object(C);

Modified: trunk/blender/source/blender/editors/object/object_select.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_select.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/object/object_select.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -600,7 +600,7 @@
 			 */
 			for (ksp = ks->paths.first; ksp; ksp = ksp->next) {
 				/* if id matches, select then stop looping (match found) */
-				if (ksp->id == base->object) {
+				if (ksp->id == (ID *)base->object) {
 					ED_base_object_select(base, BA_SELECT);
 					changed = 1;
 					break;

Modified: trunk/blender/source/blender/editors/space_graph/graph_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_draw.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/space_graph/graph_draw.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -706,7 +706,7 @@
 			if (fcu->driver) 
 				resol= 32;
 			else 
-				resol= (int)(5.0*len_v2v2(bezt->vec[1], prevbezt->vec[1]));
+				resol= (int)(5.0f*len_v2v2(bezt->vec[1], prevbezt->vec[1]));
 			
 			if (resol < 2) {
 				/* only draw one */

Modified: trunk/blender/source/blender/editors/space_nla/nla_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_nla/nla_edit.c	2011-08-30 09:26:59 UTC (rev 39793)
+++ trunk/blender/source/blender/editors/space_nla/nla_edit.c	2011-08-30 09:50:31 UTC (rev 39794)
@@ -533,7 +533,7 @@
 			if ELEM(0, (s1->flag & NLASTRIP_FLAG_SELECT), (s2->flag & NLASTRIP_FLAG_SELECT))
 				continue;
 			/* check if there's space between the two */
-			if (IS_EQ(s1->end, s2->start))
+			if (IS_EQF(s1->end, s2->start))
 				continue;
 			/* make sure neither one is a transition 
 			 *	- although this is impossible to create with the standard tools, 
@@ -613,7 +613,7 @@
 /* ******************** Add Sound Clip Operator ***************************** */
 /* Add a new sound clip */
 
-static int nlaedit_add_sound_exec (bContext *C, wmOperator *op)
+static int nlaedit_add_sound_exec (bContext *C, wmOperator *UNUSED(op))
 {
 	bAnimContext ac;
 	
@@ -1013,14 +1013,14 @@
 			
 			/* strip extents */
 		len= strip->end - strip->start;
-		if (IS_EQ(len, 0.0f)) 
+		if (IS_EQF(len, 0.0f))
 			return;
 		else
 			splitframe= strip->start + (len / 2.0f);
 			
 			/* action range */
 		len= strip->actend - strip->actstart;
-		if (IS_EQ(len, 0.0f))
+		if (IS_EQF(len, 0.0f))
 			splitaframe= strip->actend;
 		else
 			splitaframe= strip->actstart + (len / 2.0f);
@@ -1858,10 +1858,10 @@
 						strip->start= (float)CFRA;
 						break;
 					case NLAEDIT_SNAP_NEAREST_FRAME: /* to nearest frame */
-						strip->start= (float)(floor(start+0.5));
+						strip->start= floorf(start+0.5);
 						break;
 					case NLAEDIT_SNAP_NEAREST_SECOND: /* to nearest second */
-						strip->start= ((float)floor(start/secf + 0.5f) * secf);
+						strip->start= floorf(start/secf + 0.5f) * secf;
 						break;
 					case NLAEDIT_SNAP_NEAREST_MARKER: /* to nearest marker */
 						strip->start= (float)ED_markers_find_nearest_marker_time(ac.markers, start);

Modified: trunk/blender/source/blender/editors/space_outliner/outliner_tools.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_tools.c	2011-08-30 09:26:59 UTC (rev 39793)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list