From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Weinberger Subject: Re: [PATCH 1/1 linux-next] affs: add default case in switch Date: Sun, 03 May 2015 20:39:53 +0200 Message-ID: <55466B79.6090304@nod.at> References: <1430592980-28856-1-git-send-email-fabf@skynet.be> <1190129389.190434.1430676950131.open-xchange@webmail.nmp.proximus.be> <5546679F.5070000@nod.at> <383011431.191678.1430678336214.open-xchange@webmail.nmp.proximus.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Andrew Morton , LKML , linux-fsdevel To: Fabian Frederick Return-path: Received: from a.ns.miles-group.at ([95.130.255.143]:65276 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751571AbbECSj4 (ORCPT ); Sun, 3 May 2015 14:39:56 -0400 In-Reply-To: <383011431.191678.1430678336214.open-xchange@webmail.nmp.proximus.be> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Am 03.05.2015 um 20:38 schrieb Fabian Frederick: > > >> On 03 May 2015 at 20:23 Richard Weinberger wrote: >> >> >> Am 03.05.2015 um 20:15 schrieb Fabian Frederick: >>>> If the code can be reached you need to take a proper action of not the >>>> warning is bogus. >>> >>> As far as I understand, switch in affs_lookup() only updates inode number >>> when >>> it's a link so we can simply add default:break to silence gcc warning or >>> replace >>> by if(). >> >> Does the warning trigger with our default set of compiler warnings? >> Not all gcc warnings are useful. :) > Only with W=123 > >> >>> affs_iget() switch on the other hand applies to any type of file. >>> Maybe we could add default: BUG() to avoid working on bad inode ? >> >> Or cancel the operation and return -EIO to userspace. > Ok, thanks, I'll send another version :) As the warning happens only with W=123 I'd ignore it. :) Thanks, //richard