debian developer wrote:
> Hello,
>
> Consider the following code snippet...
>
> const char *type;
>
> switch (rfkill->type) {
> case RFKILL_TYPE_WLAN:
> type = "wlan";
> break;
> case RFKILL_TYPE_BLUETOOTH:
> type = "bluetooth";
> break;
> case RFKILL_TYPE_UWB:
> type = "ultrawideband";
> break;
> case RFKILL_TYPE_WIMAX:
> type = "wimax";
> break;
> default:
> BUG();
> }
>
>
> It is clear that type will be set or BUG() called. Why don't we
> initialize type to NULL during declaration??
>
or const char *uninitialized_var(type);
but IMO NULL is ok also.
> char *type = NULL;
>
> should fix the warning which i get
> warning: 'type' might be used uninitialized in this function
>
> Please let me know so that i can submit a patch for that.
>
> Thanks.
>
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ