Reputation: 195
Can any please explain in which scenarios will we get these errors?
I have a following code and lint is showing following error:
#ifdef SIC_CSI_NET
short CsiNetInit(void);
#endif
Error:
"Symbol 'CsiNetInit(void)' redeclared (precision) conflicts with line 21
There is nothing in line 21 I can see a ** which is used for comment.
Upvotes: 0
Views: 1894
Reputation: 2595
Probably, in one of the compilation units processing these lines, SIC_CSI_NET
is not defined, in contrast to the file provoking this warning, but the function is used. In that case, Lint doesn't see a prototype at all, brings a different warning (probably 718 "Symbol 'CsiNetInit' undeclared, assumed to return int"), and assumes a prototype int CsiNetInit(void);
.
When it then sees the actual prototype, the difference becomes obvious: int
vs. short
.
Upvotes: 2
Reputation: 400039
Look at the actual definition of CsiNetInit()
; perhaps its prototype specifies a different return type than short
?
Upvotes: 0