Dear Symbian Experts,
I need your knowledgeable comments about the compiler warnings.
I think that the source code should be free from compiler warnings.
I am investigating some third party source code to be used in my project.
I am evaluating the source code and trying to do its performance tuning.
Its a very big and complex source code .
While building the source code i am getting compiler warnings in many modules.
I am mentioning examples of some warnings that i am facing and threats that can be encountered because of them , kindly correct me and suggest me..
1) Warning : variable / argument 'aXYZ' is not used in function
XYZ.cpp line XYZ
i feel that if these arguments are not used or required in thde function , should i remove them or not ?
i guess that unnecessary function arguments/parameters are needlessly consuming the call stack memory , kindly suggest ?
2) Parameter mismatch case. implicit typecast by compiler issue.
for example ,
i have a function that takes TInt32 as parameter and i am passing a TInt64 value to this function. i have not seen any warning from compiler in this case . but it can be dangerous because 32 bits of data may be lost in this scenario .
eg.
void test(TInt32 x)
{
// x=5;
}
void test1()
{
TInt64 abc=40000000000;
test(abc);
}
i get only one warning here that 'x' is not used in function test().
is there any way to catch these type of scenarios ,
if there any warning settings for compiler.
i am using CodeWarrior 3.1.1.
I will add more warning issues/scenarios later.
thanks for reading my message.


Reply With Quote



