[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130117.175454.200184894667897570.davem@davemloft.net>
Date: Thu, 17 Jan 2013 17:54:54 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: jacmet@...site.dk
Cc: sque@...omium.org, netdev@...r.kernel.org, msb@...omium.org
Subject: Re: [PATCH] net: usb: initialize tmp in dm9601.c to avoid warning
From: Peter Korsgaard <jacmet@...site.dk>
Date: Thu, 17 Jan 2013 23:47:58 +0100
>>>>>> "Simon" == Simon Que <sque@...omium.org> writes:
>
> Simon> In two places, tmp is initialized implicitly by being passed as a
> Simon> pointer during a function call. However, this is not obvious to the
> Simon> compiler, which logs a warning.
>
> What warning and what compiler version are you using?
I wouldn't bother asking this, unless it's so that you personally
can reproduce this in the future.
The compiler cannot determine with %100 certainty that tmp is
initialized in all paths. Any time there are conditional
statements guarding setting and the use, the compiler is going
to err on the side of caution and say that if any of those
paths lead to a use without a set it's going to warn.
Even if it's actually impossible.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists