Running into BAD_DECL with unknown file name

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in Insure++
Dear Insure++ Experts,

I am running into a BAD_DECL group of messages I can't interpret correctly

They look like:

[VNS.c:65] (Thread 0) **BAD_DECL**
>> static IF_ERROR_MAP ErrorMap[MAX_RC] =

Incompatible global declarations: ErrorMap

Arrays have different type and dimension.
Actual declaration : array of 3 elements, declared in unknown
Conflicting declaration: array of 5 elements, declared at VNS.c, 65


File snippet:
65: static IF_ERROR_MAP ErrorMap[MAX_RC] =
66: {
67: {GOK, IF_DATETIME},
68: {GOK, IF_UPDATE_START},
69: {GOK, IF_COMMIT_START},
70: {GOK, IF_READ_START},
71: {GOK, IF_JCS}
72: };



[cache_load.c:53] (Thread 0) **BAD_DECL**
>> static CACHE_MAP fieldRecordMap[] = {

Incompatible global declarations: fieldRecordMap

Arrays have different type and dimension.
Actual declaration : array of 11 elements, declared in unknown
Conflicting declaration: array of 2 elements, declared at cache_load.c, 53


File snippet:
53: static CACHE_MAP fieldRecordMap[] = {
54:
55: {"CODE", 0},
56: {"KEY_ID", 0}
57: };


The User Guide is quite clear and straightforward about this error:

"Global Declarations Are Inconsistent
This error is generated whenever Insure++ detects that a variable has been declared as two different types in distinct source files."

My first trouble is there is no second distinct file only unknown

It looks like Insure++ somehow deduces actual number of elements in an array on run-time and it doesn't compare nicely with a declared one...

Any hints on how to deal with this sort of situations?

Windows XP SP2 x86
VS2005 Pro C++
Insure v7.1.6


Best Regards
Yuriy

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Hi Yuriy,

    The declaration from the unknown "source" file is either:

    1/ An object file which has no debugging information
    2/ An object file produced from non-C/C++, (ie: FORTRAN, COBOL or some other language)
    3/ This is Windows, which doesn't give us file names in debugging information, so we only have the point of definition

    --Rich
Sign In or Register to comment.