Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fwqy9-0000tT-Op for mharc-grub-devel@gnu.org; Mon, 03 Sep 2018 11:40:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwqy4-0000dP-NT for grub-devel@gnu.org; Mon, 03 Sep 2018 11:40:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwqxz-0007PL-Ln for grub-devel@gnu.org; Mon, 03 Sep 2018 11:40:44 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:34624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fwqxz-0007Os-EA for grub-devel@gnu.org; Mon, 03 Sep 2018 11:40:39 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w83FdSTg000984; Mon, 3 Sep 2018 15:40:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=qUSfvFr135wYxH2KL9iJo0K2hy3hVDFzRLxdyxAJEYk=; b=1+Rmceg2i1btMWMNrcvzjUzxlA7mwMTonjpEbfU4KTKOP7AZ4cjszER0C1rMVgb+hvu4 nPSGrIBrEP+wGp2e98oGQuMwxw2IfLgCJ1WjObNO8t6PnBPeYO3X06njaVE5klgaaGus 0H2de/nFmxzDK+P8INLBp80245m/tMadqEBsmalDA0Vv2UdcGIYtenPBsKK9w1fWfRWq tzQkNR0hn/RAtZF00dCVuiZ8Eg+qlmVPPyDCRaY397QuirBLUcROWSQGbFzKzSLLZ07J Rd+b7g3kT6gdBWbqf+We/ZVEcsFHQPADi48pfxy/8mYwhlyw+VGeTWMJ9c3NN1vr6hED vg== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2m7jqp8hjb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Sep 2018 15:40:38 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w83FebdU005498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Sep 2018 15:40:37 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w83FeaCh012714; Mon, 3 Sep 2018 15:40:37 GMT Received: from olila.i.net-space.pl (/10.175.220.79) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 03 Sep 2018 08:40:35 -0700 Date: Mon, 3 Sep 2018 17:40:22 +0200 From: Daniel Kiper To: Peter Jones Cc: grub-devel@gnu.org Subject: Re: [PATCH] module-verifier: make it possible to run checkers on grub-module-verifierxx.c Message-ID: <20180903154022.GF4609@olila.i.net-space.pl> References: <20180801143455.10643-1-pjones@redhat.com> <20180802143633.31567-1-pjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180802143633.31567-1-pjones@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9005 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809030164 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.78 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2018 15:40:46 -0000 On Thu, Aug 02, 2018 at 10:36:33AM -0400, Peter Jones wrote: > This makes it so you can treat grub-module-verifierxx.c as a file you can > build directly, so syntax checkers like vim's "syntastic" plugin, which uses > "gcc -x c -fsyntax-only" to build it, will work. > > One still has to do whatever setup is required to make it pick the right > include dirs, which -W options we use, etc., but this makes it so you can do s/-W/-I/? > the checking on the file you're editing, rather than on a different file. > > v2: fix the typo in the #else clause in util/grub-module-verifierXX.c > > Signed-off-by: Peter Jones If apply your patch and call this: gcc -x c -fsyntax-only -Iinclude -I. util/grub-module-verifierXX.c I see following warnings: util/grub-module-verifierXX.c:49:0: warning: "ELF_R_SYM" redefined [enabled by default] In file included from util/grub-module-verifierXX.c:12:0: include/grub/elf.h:2498:0: note: this is the location of the previous definition util/grub-module-verifierXX.c:50:0: warning: "ELF_R_TYPE" redefined [enabled by default] In file included from util/grub-module-verifierXX.c:12:0: include/grub/elf.h:2499:0: note: this is the location of the previous definition util/grub-module-verifierXX.c:51:0: warning: "ELF_ST_TYPE" redefined [enabled by default] In file included from util/grub-module-verifierXX.c:12:0: include/grub/elf.h:2495:0: note: this is the location of the previous definition Should not we drop ELF_R_SYM, ELF_R_TYPE and ELF_ST_TYPE definitions for 64-bits from util/grub-module-verifierXX.c? Daniel