[patch] ftape: shut up gcc - warning about possibly uninitializedvar in drivers/char/ftape/lowlevel/ftape-io.c

From: Jesper Juhl
Date: Thu Jan 06 2005 - 18:45:21 EST



Tiny patch whose only purpose in life is to shut up gcc below
(initializing flags to zero serves no real purpose in this function, so
this really is just a 'shut up gcc' patch) :

This is the warning it will elliminate :
drivers/char/ftape/lowlevel/ftape-io.c:93: warning: 'flags' might be used uninitialized in this function

Apply if you want, if you don't that's just fine too :)


Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>

diff -up linux-2.6.10-bk9-orig/drivers/char/ftape/lowlevel/ftape-format.c linux-2.6.10-bk9/drivers/char/ftape/lowlevel/ftape-format.c
--- linux-2.6.10-bk9-orig/drivers/char/ftape/lowlevel/ftape-format.c 2004-12-24 22:34:45.000000000 +0100
+++ linux-2.6.10-bk9/drivers/char/ftape/lowlevel/ftape-format.c 2005-01-07 00:43:22.000000000 +0100
@@ -91,7 +91,7 @@ static void setup_format_buffer(buffer_s
*/
int ftape_format_track(const unsigned int track, const __u8 gap3)
{
- unsigned long flags;
+ unsigned long flags = 0;
buffer_struct *tail, *head;
int status;
TRACE_FUN(ft_t_flow);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/