gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog configure.ac gui/kde_glue.h gui...


From: strk
Subject: Re: [Gnash-commit] gnash ChangeLog configure.ac gui/kde_glue.h gui...
Date: Wed, 18 Oct 2006 13:56:39 +0200

On Wed, Oct 18, 2006 at 01:51:50PM +0200, Bastiaan Jacques wrote:
> On Wed, 2006-10-18 at 13:44 +0200, strk wrote:
> > On Wed, Oct 18, 2006 at 10:34:03AM +0000, Bastiaan Jacques wrote:
> > 
> > > -#if SIZEOF_SIZE_T == 8
> > > -  #define SIZET_FMT "%lu"
> > > -#elif SIZEOF_SIZE_T == 4
> > > -  #define SIZET_FMT "%u"
> > > -#else
> > > -  #define SIZET_FMT "%z"
> > > +#if SIZEOF_SIZE_T == SIZEOF_LONG_LONG
> > > +  #define SIZET_FMT "%lld"
> > > +#elif SIZEOF_SIZE_T == SIZEOF_LONG
> > > +  #define SIZET_FMT "%ld"
> > > +#elif SIZEOF_SIZE_T == SIZEOF_INT
> > > +  #define SIZET_FMT "%d"
> > > +#elif SIZEOF_SIZE_T == SIZEOF_SHORT
> > > +  #define SIZET_FMT "%hd"
> > >  #endif
> > 
> > Where did the "unsigned" part go ?
> 
> I tried printf() with both unsigned and signed ints and the GCC didn't
> care which one I used. So I decided not to worry about signedness for
> this purpose anymore.
> 
> Does this generate warnings on your system? If so, is there an autoconf
> macro we can use to determine the signedness of size_t?

Actually, this is the warning:

/home/strk/src/gnash/gnash/libbase/noseek_fd_adapter.cpp:194: warning: long
   unsigned int format, size_t arg (arg 5)

and %u fixes it, so it seems that aloguht SIZEOF_SIZE_T == SIZEOF_LONG
which is defined as 4, %u is required rather then %lu.
is sizeof long really 4, btw ?

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]