On Tue, Nov 23, 2010 at 02:58:37PM +0100, Petter Reinholdtsen wrote:
> 
> [Benjamin Wolsey]
> > We shouldn't be using things like g_print. Either including log.h
> > and using log_debug, or C++ iostreams would fix this particular
> > line.
> 
> I assume you are right, but leave such large rewrite to those that
> know the code more than I do.
> 
> >> I believe this patch solve the issues, bu using size_t for
> >> non-negative values and casting the size_t argument to %d to (int).
> >
> >> -                g_print("    %d. Video Test Source (videotestsrc)\n", i);
> >> +                g_print("    %d. Video Test Source (videotestsrc)\n", 
> >> (int)i);
> 
> For this case, it might be better to use %zd instead fo casting to
> (int), to tell printf() that the variable is a size_t type.

%z is not available on all libc implementations.
We've been there in the past and finally decided we wouldn't use
printf code anymore but boost format / iostreams.

Beside, ``i'' has really no reason for being a size_t as it is compared
to ``numdevs'' which is returned by findVidDevs() which is returning
a ``g_int''. Turning everything into an ``int'' might help...

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html

_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to