[Bf-committers] some findings about code fitness
Jean-Luc Peuriere
jlp at nerim.net
Wed Mar 2 00:17:20 CET 2005
Le 28 févr. 05, à 20:26, Jean-Luc Peuriere a écrit :
> Hi,
>
> I'm in the process of creating an XCode native project for the mac (I
> know i swore i would not do it unless automaticaly, only fools dont
> change advice). It works already but need testing and fine tuning. To
> benefit from the zero linking stuff, i needed to put all in one global
> project renouncing to the libraries structures. this leaded to some
> discoveries and thoughts :
>
the patch to clean the warnings (2280 lines) is here :
https://projects.blender.org/tracker/index.php?
func=detail&aid=2281&group_id=9&atid=127
i'm down to 103 warnings from 1400+ when using the following flags :
-funsigned-char -Wno-trigraphs -Wmissing-prototypes -Wformat
-Wmissing-braces -Wparentheses -Wswitch -Wunused-function
-Wunused-label -Wunused-variable -Wunused-value -Wuninitialized
-Wunknown-pragmas -Wcomment -Wimplicit -Wreturn-type -Wstrict-aliasing
Can you state -Wall but disable Wchar-subscript (as we are using
unsigned char, it is not a problem) ?
transform, softbody and Opennl were not completely done, the first 2
because of wip status, the latter because it is complex ported code
(from FORTRAN ?) i was fearing to break.
Mostly adding missing prototypes or includes, commenting unused stuff.
some true errors were corrected like implicit int return type when
truely a char, some mistypes.
many are harmless (eg defined but not used), but the following
remaining ones may have some meaning :
Bone.c:1706: passing arg 2 of `get_objectspace_bone_matrix' from
incompatible pointer type
Bone.c:1710: passing arg 1 of `make_boneMatrixvr' from incompatible
pointer type
Bone.c:1695: passing arg 1 of `make_boneMatrixvr' from incompatible
pointer type
exotic.c:970: passing arg 1 of `Mat3MulMat3' from incompatible pointer
type
matrix.c:382: passing arg 2 of `Mat4Adj' from incompatible pointer type
matrix.c:373: passing arg 2 of `Mat3Adj' from incompatible pointer type
matrix.c:463: passing arg 1 of `Mat4Transp' from incompatible pointer
type
matrix.c:497: passing arg 1 of `Mat4One' from incompatible pointer type
matrix.c:461: passing arg 1 of `Mat3Transp' from incompatible pointer
type
matrix.c:495: passing arg 1 of `Mat3One' from incompatible pointer type
matrix.c:344: passing arg 1 of `Det4x4' from incompatible pointer type
matrix.c:440: passing arg 1 of `Det4x4' from incompatible pointer type
mball.c:398: passing arg 1 of `Mat4MulVecfl' from incompatible pointer
type
mball.c:410: passing arg 1 of `Mat4MulVecfl' from incompatible pointer
type
Object.c:965: passing arg 2 of `object_to_mat4' from incompatible
pointer type
Object.c:901: passing arg 1 of `Mat4Invert' from incompatible pointer
type
Object.c:962: passing arg 1 of `Mat4CpyMat4' from incompatible pointer
type
Object.c:969: passing arg 1 of `Mat4CpyMat4' from incompatible pointer
type
sceneRender.c:897: passing arg 2 of `BLI_convertstringcode' from
incompatible pointer type
rand.c:57: integer constant is too large for "long" type
rand.c:57: integer constant is too large for "long" type
KX_PyMath.h:51: `unsigned int Size(const MT_Tuple4&)' defined but not
used
KX_PyMath.h:50: `unsigned int Size(const MT_Tuple3&)' defined but not
used
KX_PyMath.h:49: `unsigned int Size(const MT_Tuple2&)' defined but not
used
KX_PyMath.h:47: `unsigned int Size(const MT_Matrix4x4&)' defined but
not used
KX_PyMath.h:48: `unsigned int Size(const MT_Matrix3x3&)' defined but
not used
the latter lines are defined as static in a .h, leading to 21 warnings
and duplicate code.
Shouldn't they be simply inline ?
RAS_MeshObject.cpp:570: comparison between signed and unsigned integer
expressions
GHOST_DisplayManager.cpp:119: comparison between signed and unsigned
integer expressions
RAS_MeshObject.cpp:466: comparison between signed and unsigned integer
expressions
IK_Solver.cpp:83: comparison between signed and unsigned integer
expressions
KX_PyMath.cpp:69: comparison between signed and unsigned integer
expressions
KX_GameObject.cpp:960: comparison between signed and unsigned integer
expressions
IK_QJacobianSolver.cpp:257: comparison between signed and unsigned
integer expressions
KX_BlenderRenderTools.cpp:344: comparison between signed and unsigned
integer expressions
KX_BlenderRenderTools.cpp:352: comparison between signed and unsigned
integer expressions
LOD_ManMesh2.cpp:552: comparison between signed and unsigned integer
expressions
BSP_CSGHelper.cpp:411: comparison between signed and unsigned integer
expressions
BSP_CSGMesh_CFIterator.h:228: comparison between signed and unsigned
integer expressions
BSP_CSGMesh_CFIterator.h:166: comparison between signed and unsigned
integer expressions
LOD_QSDecimator.cpp:276: comparison between signed and unsigned integer
expressions
With -wall it gives same number of warnings (with differences) + 50
char subscripts ones which are not relevant in our case
Modules owners and platform maintainers should check, it is probable i
have broken some things.
--
Jean-Luc (lukep)
insane Mac user since 89
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 5670 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20050302/4eef6710/attachment-0001.bin
More information about the Bf-committers
mailing list