From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p5NHT08P202154 for ; Thu, 23 Jun 2011 12:29:00 -0500 From: Andi Kleen Subject: Re: [PATCH v2] xfs: Silence bounds checking compiler warning References: <4E037001.8090306__42924.0493024283$1308849791$gmane$org@gmail.com> Date: Thu, 23 Jun 2011 10:27:26 -0700 In-Reply-To: <4E037001.8090306__42924.0493024283$1308849791$gmane$org@gmail.com> (Maarten Lankhorst's message of "Thu, 23 Jun 2011 18:55:29 +0200") Message-ID: MIME-Version: 1.0 List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Maarten Lankhorst Cc: xfs-masters@oss.sgi.com, xfs@oss.sgi.com, Linux Kernel Mailing List , Alex Elder Maarten Lankhorst writes: > gcc with -Warray-bounds generates a false positive on this > since xfs defines the struct with u8 name[1]; to be able to > add a tag at the end. A better way would be to define it as name[0]. Then the compiler would know it's a VLA. You may need to check noone relies on the one byte though. -Andi -- ak@linux.intel.com -- Speaking for myself only _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs