[PATCHES] 4 small patches for various code improvements
Hi, I'd like to commit the 4 small attched patches if no one care. -- Clément B. Not sent from a jesusPhone.
On Wed, Nov 24, 2010 at 10:01:27PM +0100, Clément Bœsch wrote:
I'd like to commit the 4 small attched patches if no one care.
Ok.
On Thu, Nov 25, 2010 at 07:49:20AM +0100, Reimar Döffinger wrote:
On Wed, Nov 24, 2010 at 10:01:27PM +0100, Clément Bœsch wrote:
I'd like to commit the 4 small attched patches if no one care.
Ok.
Thanks, applied. -- Clément B. Not sent from a jesusPhone.
Am 24.11.2010 22:01, schrieb Clément Bœsch:
int nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl ) { return -1; - // To shut up gcc warning - fd++; - pos++; - stream_ctrl=NULL; }
One can also shup up the warning by using a nameless declaration (only types): int nop_streaming_seek( int , off_t , streaming_ctrl_t * ) { return -1; } Just a thought -- cheers, Alex
Hi, On Thu, Nov 25, 2010 at 09:22:21AM +0100, Alexander Roalter wrote:
Am 24.11.2010 22:01, schrieb Clément B??sch:
int nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl ) { return -1; - // To shut up gcc warning - fd++; - pos++; - stream_ctrl=NULL; }
One can also shup up the warning by using a nameless declaration (only types): I think that's valid only for C++. But another way (without side effects) is to cast using (void) like: (void)fd;
-- fenrir
On Thu, Nov 25, 2010 at 03:45:43PM +0100, Laurent Aimar wrote:
Hi,
On Thu, Nov 25, 2010 at 09:22:21AM +0100, Alexander Roalter wrote:
Am 24.11.2010 22:01, schrieb Clément B??sch:
int nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl ) { return -1; - // To shut up gcc warning - fd++; - pos++; - stream_ctrl=NULL; }
One can also shup up the warning by using a nameless declaration (only types): I think that's valid only for C++.
It's not valid in C at least.
But another way (without side effects) is to cast using (void) like: (void)fd;
The warning is not activated. It's the -Wunused-parameter option, included in -Wextra, so we don't care. And yes (void) trick is actually better than modifying the variables. -- Clément B. Not sent from a jesusPhone.
participants (4)
-
Alexander Roalter -
Clément Bœsch -
Laurent Aimar -
Reimar Döffinger