From patchwork Mon Nov 18 21:03:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 3199101 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C53649F43F for ; Mon, 18 Nov 2013 21:03:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CBC82011F for ; Mon, 18 Nov 2013 21:03:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5360200E8 for ; Mon, 18 Nov 2013 21:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527Ab3KRVDX (ORCPT ); Mon, 18 Nov 2013 16:03:23 -0500 Received: from mail-wg0-f54.google.com ([74.125.82.54]:40549 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350Ab3KRVDW (ORCPT ); Mon, 18 Nov 2013 16:03:22 -0500 Received: by mail-wg0-f54.google.com with SMTP id y10so6665292wgg.21 for ; Mon, 18 Nov 2013 13:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=wu4VccoSGX2fbY9Kfb2urckJrLeK0fw28cauZiW8m7U=; b=oltNwqCoXgS6Nwgy6tge3W2m9Z2y3sTxbk+tqfVRHeMwywOxztAuw11Ouyfw31yHUG nxOD1uYfECYM1PLu94ZRnzrkM6b3aDwzDmdb1rkxTlsV2qqbWBdGNbyIfNqu1u2QUB8B /bvQXWfxOEtgxb8Y2UzBmwtOW3rCy95GkWgnV11IYdgY3NW0NRpEO5SzPmA6YWuGeANe AWd4ofu2bUEa7PmX7DIMehEafWbiBMSCfhizxWq1pjk/0ZKFVLHwJds56LuN4EibNElO LEZG5PWn1C3ZeCYAfO9v2dhV3SPWjm9yhW72HLvbs78n2kL/rEGzc/b4MnCaLpDKSzVS H/mw== X-Received: by 10.180.184.112 with SMTP id et16mr18649176wic.4.1384808601123; Mon, 18 Nov 2013 13:03:21 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id y20sm27836798wib.0.2013.11.18.13.03.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Nov 2013 13:03:20 -0800 (PST) From: "Yann E. MORIN" To: linux-kbuild@vger.kernel.org Cc: Madhavan Srinivasan , Christian Kujau , "Yann E. MORIN" , Benjamin Poirier Subject: [PATCH] kconfig: add comment about 'jump maybe used unitialized' Date: Mon, 18 Nov 2013 22:03:15 +0100 Message-Id: <1384808595-26028-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.8.1.2 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Yann E. MORIN" On some distros shipping gcc 4.8.0 20130526 (as reported by Madhavan), gcc incorrectly warns about 'jump may be used uninitialized'. Given the current code path, this is not possible. gcc 4.6.x, 4.7.x and 4.81+ do not emit this warning. So, we consider this as a spurious error from the gcc 4.8.0 that is shipped on a specific (unidentifed so far) distro. But since two users have reported this issue, lets comment the 'jump' declaration that it should *not* be initialised, since we will still want to catch unitialised use in the future, should we were to change the code. Reported-by: Madhavan Srinivasan Reported-by: Christian Kujau Signed-off-by: "Yann E. MORIN" Cc: Benjamin Poirier --- All, Here is the patch I'm queuing to 'solve' this issue. I'll wait a bit for some feedback before I push it. Madhavan, Christian, if you could give a bit ;ore details on the distro you're using, that be nice so we can have a more descriptive commit log. Regards, Yann E. MORIN. --- scripts/kconfig/menu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index c1d5320..a7b0566 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -544,6 +544,13 @@ static void get_prompt_str(struct gstr *r, struct property *prop, { int i, j; struct menu *submenu[8], *menu, *location = NULL; + /* gcc 4.8.0 on (on some distros) warns about 'jump may be used + uninitialized', which is wrong, given the current code-path. + The warning does not appear with gcc != 4.8.0. + If we were to change the code below, we would still want gcc to + warn if jump is unitialised, so we explicitly do *not* initialise + it here. + */ struct jump_key *jump; str_printf(r, _("Prompt: %s\n"), _(prop->text));