From owner-svn-src-all@freebsd.org Fri Jan 26 06:02:03 2018 Return-Path: Delivered-To: svn-src-all@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 BCC15EC34B3 for ; Fri, 26 Jan 2018 06:02:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 3015A84E47 for ; Fri, 26 Jan 2018 06:02:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-wm0-x234.google.com with SMTP id f71so18743561wmf.0 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=JQyLK8hQpvmD52/91xomAcaBRnxN0cy3VmyJ6ZwxocwHEti4hugdFrhSUUk3A1lLX7 xyrABJLJ5kEkwxH/1qiDj+iJUiyf+ek4d6VFpI9H2BNf5pn7OAQicB3qqqIXP8ZqOuLz JARznwLiNazfHGGJzck2UjCOF/ZpAPJiqeB4h8X21Z5gHOX81G9pc4twqMGIxQ5v57VQ 5NHnSL/AaaAKfTjeFN8PAKtc9JAsWXW0rUF8NH1RYCH8VCA/QGmxTS2wXrkZKPy8agYc 0nKU9x8eVMFIXwqRvIrTA9q0lmTgeI1ay2ceg9RYTM321Js2ISv6OkmTF+X/azeDtrXb 1XWw== X-Gm-Message-State: AKwxytc6zPdjPjHKiP+9t0JI9rfZKfyND+alCj7FHQmh1cDCYJurMkgn 0P49YR596DFrQn/6A3EaRCmU0ap/1q+76umFd7hxjA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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