Static Analysis Problem Type Reference

Inconsistent enumeration declaration (enum value mismatch)

An inconsistent data declaration was found.

In this case, the same name was declared as an enumeration in two compilation units, but comparison of the two enumeration types failed because the value of an enumeration literal did not match.

ID

Code Location

Description

1

Definition

The first definition

2

Definition

The second definition

Example

file1.c:

enum {a,b,c = 5} x;

int main(int argc, char **argv)
{
    return 0;
}
        
file2.c:
          
    enum {a,b,c = 4} x;