From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753699AbbDPUfG (ORCPT ); Thu, 16 Apr 2015 16:35:06 -0400 Received: from senator.holtmann.net ([87.106.208.187]:35243 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040AbbDPUfC convert rfc822-to-8bit (ORCPT ); Thu, 16 Apr 2015 16:35:02 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: [PATCH] Bluetooth: Pre-initialize variables in read_local_oob_ext_data_complete() From: Marcel Holtmann In-Reply-To: <1429212265-26750-1-git-send-email-geert@linux-m68k.org> Date: Thu, 16 Apr 2015 13:34:54 -0700 Cc: "Gustavo F. Padovan" , Johan Hedberg , BlueZ development , netdev , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <1429212265-26750-1-git-send-email-geert@linux-m68k.org> To: Geert Uytterhoeven X-Mailer: Apple Mail (2.2098) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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