From owner-dev-commits-src-all@freebsd.org Mon Jan 11 19:22:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0992E4E3C93 for ; Mon, 11 Jan 2021 19:22:27 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DF3W61TM4z4jyS for ; Mon, 11 Jan 2021 19:22:25 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f45.google.com with SMTP id 190so260926wmz.0 for ; Mon, 11 Jan 2021 11:22:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=swcxcyZvikKZOUbqA2s5EDNMASx1ea5+IOTDA8KRWVg=; b=dQSUSUVnpwCBrKYGxiO1JWRehEwKGa6uMBZs6/jazB1eIpHUGSJr0196+vHRPwdbna t+vIDTSPxzSRLZa14ih3SdqtpQ6PCViI2j2NOPFunA0G43zV4Vl68WtBNyMfmj4jK6CX DPd/1DpwVYZo4UTMLPcJHxGNjXvv+uN/QaMLT5scSL2v5po6VYPv5H6As7zI3b2cDVMI bVlG9ZxnYvoSNkGR/NM0TnBbZsD81YquVe+VdqY/zXGFkf3J6SqvpdfygtsHfcRPG+jH TcAvUitSW/hPQAJpcp09OfPEh9eQvJ7mRsJg/XR5tFwnJjRWTVz6l0iFwGMW4Cr8UgkW B3ww== X-Gm-Message-State: AOAM532Nv6PoYZUPaNaUdc5y7//X1oVYAL3o/fKpVzwn5r1g/SzML3Oi zt1hbRg5FuQVSEybGQECzrmjpA== X-Google-Smtp-Source: ABdhPJy6Y4iB8t4jR9gOdiiB0tPQ+84nIhyXJ6Ek4fg+s4p6UPVDfEwoB9/FOK9fIMgrJ0Lwm9Ueww== X-Received: by 2002:a7b:c145:: with SMTP id z5mr288574wmi.164.1610392944732; Mon, 11 Jan 2021 11:22:24 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id r7sm400923wmh.2.2021.01.11.11.22.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2021 11:22:24 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 16079c7233be - main - hid: quiet -Wswitch From: Jessica Clarke In-Reply-To: <915475fa-0072-2303-dfc9-dbeb42224434@kondratyev.su> Date: Mon, 11 Jan 2021 19:22:21 +0000 Cc: John Baldwin , Ryan Libby , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <486B154B-376A-4000-8946-844353D8504E@freebsd.org> References: <202101110554.10B5sW2q070743@gitrepo.freebsd.org> <700dd42d-2d73-e54a-5fcc-b62ed31df80d@FreeBSD.org> <915475fa-0072-2303-dfc9-dbeb42224434@kondratyev.su> To: Vladimir Kondratyev X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DF3W61TM4z4jyS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 19:22:27 -0000 On 11 Jan 2021, at 19:14, Vladimir Kondratyev = wrote: > On 11.01.2021 21:03, John Baldwin wrote: >> On 1/10/21 9:54 PM, Ryan Libby wrote: >>> The branch main has been updated by rlibby: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D16079c7233be8bd6c88e3421a70c7ca8= 7cfea370 >>>=20 >>> commit 16079c7233be8bd6c88e3421a70c7ca87cfea370 >>> Author: Ryan Libby >>> AuthorDate: 2021-01-11 05:53:15 +0000 >>> Commit: Ryan Libby >>> CommitDate: 2021-01-11 05:53:15 +0000 >>>=20 >>> hid: quiet -Wswitch >>>=20 >>> Gcc builds complained that not all switch cases are handled. Add >>> default cases to appease gcc. >>>=20 >>> Reviewed by: hselasky (previous version), wulf >>> Sponsored by: Dell EMC Isilon >>> Differential Revision: https://reviews.freebsd.org/D28082 >>=20 >> If these cases are never reachable, then I think = '__assert_unreachable()' >> is preferred to a plain break. >>=20 > These cases are reachable. They are NOP steps of state machine. How many states are there? It might be better to document that using an explicit set of case labels that just immediately break (and then -Wswitch will help you in future in case you ever forget to update one of the switch statements). Where possible -Wswitch is best fixed, not silenced with default, though there are times when the latter is preferable. Jess