Search

ParaSoft

HOME
PRODUCTS
SUPPORT
ABOUT
WHAT'S NEW
EVENTS


Insure++

Quick facts

Add-on Modules:
   -INUSE
   -TCA

Comparisons

Technical Papers

Support & Manuals

FAQs

Recent Reviews

User Testimonials

Press Releases


Insure tool to debug c++





Insure++ Reference - BAD_INTERFACE



BAD_INTERFACE

Actual declaration of xxx conflicts with interface, or
Ignoring interface for xxx: conflicts with static or in-line declaration

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.

Problem

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) bug
	7:		int i;
	8:	{
	9:		fprintf(stderr, "%d\n", i);
	10:	}

Diagnosis (during compilation)


1.	[badint.c:6] **BAD_INTERFACE**
2.		   Ignoring interface for printf: conflicts with static
			or inline declaration.
	>>   static void printf(i)


  1. Source line at which the problem was detected.
  2. Description of the problem and the expression that is in error.

Repair

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
Tools to debug c++ and java
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft