Hi,

> I don't know C++ very well, so I'm not sure what to make of some of these
> messages PC-lint gives me.

Actually, we're only using ANSI C (well, mostly ANSI) and a few code
generators for it (lex, yacc, cfsml.pl), no C++.

> If it wouldn't be too much trouble, could you
> take a look at these and tell me how I can filter which ones are problems
> and which ones aren't? Your comments on bit-shifting before really helped
> a lot.

I'll have a look, but it looks rather... particular this time.

>   _
>   return *d | (d[1] << 8);
> ..\include\resource.h  146  Error 34: Non-constant Initializer
>     used in expression

I'm afraid that I fail to see what lint's problem is here... We're
not assigning anything to a variable anyway.

> ..\include\gfx_system.h  144  Error 64: Type mismatch (initialization)
> (int =
>     struct)

This is just wrong- the struct members most definitely are ints.

> ..\include\gfx_system.h  144  Error 34: Non-constant Initializer

Only from the point of view of optimized code- it conforms to ANSI C's
initializer rules, as far as I can tell...

[...]

>               _
>         point_t point;
> ..\include\gfx_system.h  245  Error 78: Symbol 'point_t' typedef'ed at
> line 235
>     used in expression

...and?

[...]


I'm sorry, but I fail to see what is supposed to be wrong with what we're
doing there this time... :-/

Maybe someone else with a more ANSIish C background has an explanation for
this...?


llap,
 Christoph

Reply via email to