Easy c debugging question
Joerg Sonnenberger
joerg at britannica.bec.de
Tue Mar 29 09:44:22 PST 2005
On Tue, Mar 29, 2005 at 05:32:23PM +0300, Dennis Melentyev wrote:
> walt wrote:
> >printf("user=%16d\n", k->cp_user);
>
> The hint:
>
> Just use -Wformat or even -Wall, -pedantic and -Werror in gcc command
> line and _*READ*_ the warnings.
[...]
>
> So, you're trying to spoil the stack putting there 64bit values but
> extracting the 32bit ones...
Right. You should include inttypes.h and use e.g. PRId64 to format it.
Joerg
More information about the Users
mailing list