[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Re: [patch] Get rid of warnings in findwebcams.cpp
From: |
Petter Reinholdtsen |
Subject: |
[Gnash-dev] Re: [patch] Get rid of warnings in findwebcams.cpp |
Date: |
Tue, 23 Nov 2010 14:58:37 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
[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.
Happy hacking,
--
Petter Reinholdtsen