Re: [PATCH] Bluetooth: Pre-initialize variables in read_local_oob_ext_data_complete()

From: Marcel Holtmann
Date: Thu Apr 16 2015 - 16:35:12 EST


Hi Geert,

> net/bluetooth/mgmt.c: In function âread_local_oob_ext_data_completeâ:
> net/bluetooth/mgmt.c:6474: warning: âr256â may be used uninitialized in this function
> net/bluetooth/mgmt.c:6474: warning: âh256â may be used uninitialized in this function
> net/bluetooth/mgmt.c:6474: warning: âr192â may be used uninitialized in this function
> net/bluetooth/mgmt.c:6474: warning: âh192â may be used uninitialized in this function
>
> While these are false positives, the code can be shortened by
> pre-initializing the hash table pointers and eir_len. This has the side
> effect of killing the compiler warnings.

can you be a bit specific on which compiler version is this. I fixed one occurrence that seemed valid. However in this case the compiler seems to be just plain stupid. On a gcc 4.9, I am not seeing these for example.

Regards

Marcel

--
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/