From owner-svn-src-head@freebsd.org Fri Jan 26 06:02:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B602CEC34B1 for ; Fri, 26 Jan 2018 06:02:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27E0084E45 for ; Fri, 26 Jan 2018 06:02:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-wm0-x236.google.com with SMTP id i186so18702285wmi.4 for ; Thu, 25 Jan 2018 22:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lIUuXEvwVNVGQexm2hQAXZfQD6t3JWJ7QvbIsiWlPF4=; b=GaikJqohQriPdn7tsP3jyE0Dr2RShbNWhiTBOTphF8YmxMC5yHOeKusye3HzbdqUP7 +8PGBpq5S5Mts46eB8qg5Xxif0h0NVWqnTWj3/VUuf7aPuYG5d54O3oUvEr9JDbx3xSO Qum5PyB/q42/rydU2tLN2b2oBC6UZ5LFDf2JsncB5+OFOeFsaDx05QCyT8yC3X4aojpR jMsVHcU/Ucdd8Az4d3gzra5Nx4h/rRKZROj1Qk/JqhhN/2sMAGdO2WAtMxDAah1WL7nP ol2eiqgmlZSlMXciGQdFNUp2cuOTACNZZgbZT1SqIyB4IhblSCdosHuSS383oSK85hF0 +0aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=lIUuXEvwVNVGQexm2hQAXZfQD6t3JWJ7QvbIsiWlPF4=; b=otBZX95EXwB/u1FXKnoAytocbU2SEmMDdb22Cx2DvZT9hu0lnkCalHja7/5713pufW rCEjH64bfFurhI5ouF5Ho3vBRavVWCjbXGFZ7FsOjheZF4+PXRtvK2i2MUwrwOYZ89DR frAebLL7U5jhqEthbPvDhDj5qf53C8m5pdKuyKQ8UnHGEvMHPw9MAZu3EW1OO3jonryY TEYQJxo61BF35n+fFwwTbpD8OkYVPkI6PmmaeiZ1/nRYF3T095oWZpuhJWTlN39df1gA 565EkDzX3OQ/rPjFQTNGSRKw1FBzNNEb7UDRWDehTnc8WFeIJVy15IOcvC+4ErctT9ix lAiw== X-Gm-Message-State: AKwxytetwB35Ztj15A+oTyzpScUwWrPdj/QvLt6eQAVpPU9rK5A0MtQW ch3WemKoM+Qg4VWuhuAOp9C0Po0tKDsFwmG8APoKiw== X-Google-Smtp-Source: AH8x225tF012qhFXUFtdrEPai9/5hIpWFHiVeupSjXcy1D+2OdPOWli2wS2JPrW9G+yjyFVcQ0z/XJCgtlQEHISYmoc= X-Received: by 10.80.170.24 with SMTP id o24mr32467561edc.258.1516946522062; Thu, 25 Jan 2018 22:02:02 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.80.133.195 with HTTP; Thu, 25 Jan 2018 22:02:01 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201801260440.w0Q4efhg008105@repo.freebsd.org> From: Warner Losh Date: Thu, 25 Jan 2018 23:02:01 -0700 X-Google-Sender-Auth: KeoayirUaVwf3xCf9OYTpxjvc3A Message-ID: Subject: Re: svn commit: r328430 - head/sbin/devd To: Eitan Adler Cc: Matt Joras , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 06:02:04 -0000 On Thu, Jan 25, 2018 at 10:04 PM, Eitan Adler wrote: > On 25 January 2018 at 21:02, Matt Joras wrote: > > On Thu, Jan 25, 2018 at 8:52 PM, Warner Losh wrote: > >> > >> > >> On Thu, Jan 25, 2018 at 9:40 PM, Eitan Adler > wrote: > >>> > >>> Author: eadler > >>> Date: Fri Jan 26 04:40:41 2018 > >>> New Revision: 328430 > >>> URL: https://svnweb.freebsd.org/changeset/base/328430 > >>> > >>> Log: > >>> devd: minor nits > >>> > >>> - mark usage as noreturn > >>> - config does not need a virtual destructor > >> > >> > >> Everything needs a virtual destructor... Please back that part of this > >> out... > >> > >> Warner > > Needs? If there's not inheritance there's no _need_ to do it, and it's > > arguably superfluous. That being said it's also an arguably > > superfluous change to remove it. > > Yeah, I don't think this needs it. That said, readded in 328431. I > removed it originally since it was the only virtual function in config > and it seemed out of place. At the least, I went looking for what > inherited from it. > It's a flaw in C++ that you have a choice here. All dtors should be virtual because you never know when you'll have new derived classes and have to hunt down a hard-to-find bug because you didn't go back and make it virtual. Of course, this flaw is there because of other flaws in the language. This isn't one of the cases where having it is harmful, so stylistically I always have them unless there's a good reason not to because were I to create derived classes, I might forget to make it virtual. It's an old habit, I'll admit. Warner