Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp512729imu; Tue, 11 Dec 2018 03:05:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/UlOi5pSi12l/AQL01vOngQ9W37efPcxTBB2jJl2wPd3E5CyFNMZQjPMEESYLWQi5kaepDJ X-Received: by 2002:a62:7f94:: with SMTP id a142mr16016637pfd.96.1544526335540; Tue, 11 Dec 2018 03:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544526335; cv=none; d=google.com; s=arc-20160816; b=mS3aV9IYKJNjKYmZ1SgMWlMP1JNoCruPfdm0B+LfApUYB3cIPTlbe3pBmGgP7XBbgm ayB/peFTLWxx9CXjZYymCJ4XSqynmB2cx3SZ+cCRIK9stTrfaN44bHhs8CWnvqfExZ6T TXFUA6r4ddxm3celdvQY2CYEZ3IpY2HbjkWysH+EWRtQVf3waQyEVKTk2oDTiqo8dXls 8ZWYA6ZknUE98qhPfwhvm6j3B/RaLpXmkXRYnHTwBQ0Lsa1ToYSOeAXBXUgkxBuvEpZF Jv7bUaWPisEGNzsRU/V7WEE88B79zHP1pLYMqox0JN52vcAWGcOMQrRJaaVBFsTTO+AJ n/Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=mncNGlTLnxVAb43S35qXiIVRiqRfjL/tj0kSfjctkSE=; b=n5eU8RyJIBFC8boT2HMd4Kfr/sRPaPTAw1BGcJWM0MIUBWOQExOKogkpDytre8ExP6 uZ0SWpsAcQUhu1y7MBS9stWONC342ZBGk0ocrEg/rYLoRMmR8PiLzvm8Ttk9rePImA+W Dga16cJioVGNEVOkxxkHEZnOnQE9zwbLEcq3LdvmWVb9HeSnsqvXINbZDosCnvmQ9awd BS/mzm/UyWE6qx3eulCgWbIM+peJcNmVxgJhmr6LA3WHXF86/I09CXRFeqLBikS9G8Pj +pgVNn1RmAfTrCZ4RSNNExPRFxGkO7yXomeFee8r0OT/NOJLOEsVsgZiihav2peIxXOZ xkyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LJLQScGS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u30si11545703pgn.170.2018.12.11.03.05.20; Tue, 11 Dec 2018 03:05:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LJLQScGS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726847AbeLKLCt (ORCPT + 99 others); Tue, 11 Dec 2018 06:02:49 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:36705 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbeLKLBn (ORCPT ); Tue, 11 Dec 2018 06:01:43 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wBBB1C5c017210; Tue, 11 Dec 2018 20:01:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wBBB1C5c017210 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544526074; bh=mncNGlTLnxVAb43S35qXiIVRiqRfjL/tj0kSfjctkSE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LJLQScGS95+DMJ0pUZ4F4ERVfNgBRNdjKdJyw2Jh4YoLQ90RWS1fJqRp1ns8p0P3d 3bp8GbpD9Y1wWxsww3uUKJBrjm0BSjNPhQCnUanWCRK48hKpp63ZQtM8PRZkQEgufF mvrwB2ZRU7VjpeA4mF5+K4B4RTLMYXvkundt6I+l0qbbAx8UHgnMwifvvUgjitNtDo XWbNIDGfNJevM2Wi4y03cvQFURMNHmvoWdx7DA3mPeIQJEbYpcKR4e/WulRz+1x6h4 P7MeFFffvsqg7Fc6wNHG2rQeqDrAKi0ZxlmXn3IJNCxXTKS4MEa3uJaCoI39oedbVn yd799o5r/5Bzg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ulf Magnusson , linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 01/27] kconfig: fix file name and line number of warn_ignored_character() Date: Tue, 11 Dec 2018 20:00:44 +0900 Message-Id: <1544526070-16690-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544526070-16690-1-git-send-email-yamada.masahiro@socionext.com> References: <1544526070-16690-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, warn_ignore_character() displays invalid file name and line number. The lexer should use current_file->name and yylineno, while the parser should use zconf_curname() and zconf_lineno(). This difference comes from that the lexer is always going ahead of the parser. The parser needs to look ahead one token to make a shift/reduce decision, so the lexer is requested to scan more text from the input file. This commit fixes the warning message from warn_ignored_character(). [Test Code] ----(Kconfig begin)---- / -----(Kconfig end)----- [Output] Before the fix: :0:warning: ignoring unsupported character '/' After the fix: Kconfig:1:warning: ignoring unsupported character '/' Signed-off-by: Masahiro Yamada --- scripts/kconfig/zconf.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 25bd2b8..eeac64c 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -73,7 +73,7 @@ static void warn_ignored_character(char chr) { fprintf(stderr, "%s:%d:warning: ignoring unsupported character '%c'\n", - zconf_curname(), zconf_lineno(), chr); + current_file->name, yylineno, chr); } %} -- 2.7.4