lkml.org 
[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Bluetooth: Pre-initialize variables in read_local_oob_ext_data_complete()
From
Date
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



\
 
 \ /
  Last update: 2015-04-16 23:01    [W:0.087 / U:1.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site