Hi,
I am working on to remove warning messages in all my C,C++ files in both Sun and HP machines. When i compile my CPP program in Sun environment, it gives me the following warning.
"../src/CPUtils.cpp", line 26: Warning (Anachronism): Formal argument comp of type int(*)(const char*,const char*) in call to strToInt(const StrIntMap*, const RWCString&, int, bool, int(*)(const char*,const char*)) is being passed extern "C" int(*)(const char*,const char*).
To resolve the above warning, i just put extern C in front of my function. After that when i compiled the same program in Sun, its working fine. But it giving me the following warning in HI environment.
Warning 495: "../src/CPUtils.cpp", line 17 # The linkage directive is ignored for an object or function declared static.strToInt(const StrIntMap* map, const RWCString& str, int notFoun).
How would i proceed with this one. I have to solve this in both HP and Sun.
Can any one give me the solution will be greatly appreciated.
Thanks and regards,
Ram
I am working on to remove warning messages in all my C,C++ files in both Sun and HP machines. When i compile my CPP program in Sun environment, it gives me the following warning.
"../src/CPUtils.cpp", line 26: Warning (Anachronism): Formal argument comp of type int(*)(const char*,const char*) in call to strToInt(const StrIntMap*, const RWCString&, int, bool, int(*)(const char*,const char*)) is being passed extern "C" int(*)(const char*,const char*).
To resolve the above warning, i just put extern C in front of my function. After that when i compiled the same program in Sun, its working fine. But it giving me the following warning in HI environment.
Warning 495: "../src/CPUtils.cpp", line 17 # The linkage directive is ignored for an object or function declared static.strToInt(const StrIntMap* map, const RWCString& str, int notFoun).
How would i proceed with this one. I have to solve this in both HP and Sun.
Can any one give me the solution will be greatly appreciated.
Thanks and regards,
Ram