Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440AbbECSXi (ORCPT ); Sun, 3 May 2015 14:23:38 -0400 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 S1751035AbbECSXb (ORCPT ); Sun, 3 May 2015 14:23:31 -0400 Message-ID: <5546679F.5070000@nod.at> Date: Sun, 03 May 2015 20:23:27 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Fabian Frederick CC: Andrew Morton , LKML , linux-fsdevel Subject: Re: [PATCH 1/1 linux-next] affs: add default case in switch References: <1430592980-28856-1-git-send-email-fabf@skynet.be> <1190129389.190434.1430676950131.open-xchange@webmail.nmp.proximus.be> In-Reply-To: <1190129389.190434.1430676950131.open-xchange@webmail.nmp.proximus.be> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 883 Lines: 23 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. :) > 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. Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/