Receiving BAD INTERFACE from Insure++
During Compilation, BAD INTERFACE pops up..
It appears that BAD INTERFACE error occurs when I have a extern to a function:I have the following:
Declaration conflicts with interface: syslog
>> extern int syslog (int priority, char *fmt, ...);
Please contact Parasoft support: [email protected]
another one:
Declaration conflicts with interface: atoi
>> int atoi (char *str);
Please contact Parasoft support: [email protected]
I have had my own syslog for 22 years and so I wish to either figure out how to fix this issue, or turn off the BAD INTERFACE for the specific lines. Since we are cross platform over several different *NIX platforms, we have developed several common functions that may not exist on one platform or another (ie: nanosleep, atoi, etc). Thus, this happens to more than just above examples.
Any ideas?
Chris Litchfield
Tagged:
0
Comments
In this case, you are probably getting the message because the standard signature for syslog is
void syslog(int priority, const char *message, ... /* argument */);
and that is probably the version Insure++ expects for the compiler/platform you are on.
http://www.opengroup.org/onlinepubs/799098...xsh/syslog.html
You could also change your local definition to match the standard, and the error message should go away.
Likewise for atoi, whose signature is:
CODE
int atoi(const char *str);
Excellent. This is what I was needing. When I switched my prototypes to match the standard. When I did I found a ton more issues.