On Mon, Apr 24, 2006 at 08:33:39PM -0401, Ray Lai wrote:
> On Tue, Apr 25, 2006 at 12:10:14AM +0200, Tobias Ulmer wrote:
> > Here's a patch that removes all(?) warnings/errors from the
> > intro chapter if you followed the instructions in the readme...
> >
> >
> > diff -ru unpv13e.orig/intro/byteorder.c unpv13e/intro/byteorder.c
> > --- unpv13e.orig/intro/byteorder.c Thu Nov 14 04:33:33 2002
> > +++ unpv13e/intro/byteorder.c Tue Apr 18 04:39:40 2006
> > @@ -18,7 +18,7 @@
> > else
> > printf("unknown\n");
> > } else
> > - printf("sizeof(short) = %d\n", sizeof(short));
> > + printf("sizeof(short) = %zd\n", sizeof(short));
>
> Use %zu for sizeof(), since it returns size_t, an unsigned type.
>
> -Ray-
>
>
My mistake, thanks Ray :)
Tobias