Insure++ Reference - BAD_INTERFACE
This error will be generated any time there is a significant discrepancy
between the source code being processed and an interface to one of the
functions in the code. Common sources of this problem are redeclarations of
standard system functions in your code.
The following code shows a redeclaration of the function
printf which will conflict with the version of the
function expected by the interface.
1: /*
2: * File: badint.c
3: */
4: #include <stdio.h>
5:
6: static void printf(i)
7: int i;
8: {
9: fprintf(stderr, "%d\n", i);
10: }
1. [badint.c:6] **BAD_INTERFACE**
2. Ignoring interface for printf: conflicts with static
or inline declaration.
>> static void printf(i)
- Source line at which the problem was detected.
- Description of the problem and the expression that is in error.
There are several ways to approach solving this problem. The correct
solution for your situation depends upon why the function was redefined
in your code. If this is a version of the function that is used with all
your code, a permanent solution would be to write a new interface
corresponding to your version of the function. (See the
"Writing simple
interfaces") A quicker, more temporary solution,
appropriate if you only use this version of the function occasionally,
would be to temporarily disable the checking of this interface using
the
interface_ignore option in your
.psrc file. This option can be turned on and off
on a per file basis as you work with different code which uses different
versions of the function in question.
BAD_FORMAT
BAD_PARM
|