Maybe not important, but the format string may lead to crash, so I would prefer
explicit cast here...
...
/usr/src/hugin/hugin_hg/src/hugin_base/algorithms/basic/CalculateOptimalROI.cpp:
In member function ‘int HuginBase::CalculateOptimalROI::autocrop()’:
/usr/src/hugin/hugin_hg/src/hugin_base/algorithms/basic/CalculateOptimalROI.cpp:402:109:
warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type
‘long int’ [-Wformat]
/usr/src/hugin/hugin_hg/src/hugin_base/algorithms/basic/CalculateOptimalROI.cpp:416:109:
warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type
‘long int’ [-Wformat]
...
Korneldiff -r 291e316c4327 src/hugin_base/algorithms/basic/CalculateOptimalROI.cpp
--- a/src/hugin_base/algorithms/basic/CalculateOptimalROI.cpp Tue Sep 18 20:35:57 2012 +0200
+++ b/src/hugin_base/algorithms/basic/CalculateOptimalROI.cpp Tue Sep 18 21:37:05 2012 +0200
@@ -399,7 +399,7 @@
nonreccheck(0,0,o_optimalSize.x,o_optimalSize.y,acc,2);
if(maxvalue>0)
{
- printf("Inner %d %d: %d %d - %d %d\n",acc,maxvalue,best.left,best.right,best.top,best.bottom);
+ printf("Inner %d %ld: %d %d - %d %d\n",acc,(long) maxvalue,best.left,best.right,best.top,best.bottom);
break;
}
}
@@ -413,7 +413,7 @@
nonreccheck(0,0,o_optimalSize.x,o_optimalSize.y,acc,1);
if(maxvalue>0)
{
- printf("Inner %d %d: %d %d - %d %d\n",acc,maxvalue,best.left,best.right,best.top,best.bottom);
+ printf("Inner %d %ld: %d %d - %d %d\n",acc,(long) maxvalue,best.left,best.right,best.top,best.bottom);
break;
}
}
signature.asc
Description: This is a digitally signed message part.
