Synopsis: | Initialisers for a struct or union must have compatible type |
Language: | C |
Severity Level: | 2 |
Category: | DECLARATIONS |
Description: |
Justification: The initialiser could be a different structure, union or enum or a pointer to a different structure or union. This behaviour is not explicitly defined in ANSI
Example: Here 'point' has 'coord' structure but the initialiser has pointer to coord structure making them incompatible.struct coord * ptr; struct coord point = ptr; |