From owner-svn-src-all@freebsd.org Thu May 24 04:17:12 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 3D56DEFAE73 for ; Thu, 24 May 2018 04:17:12 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16010716C4 for ; Thu, 24 May 2018 04:17:11 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com [209.85.161.181]) (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)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id D3F02D9CA for ; Thu, 24 May 2018 04:17:10 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yw0-f181.google.com with SMTP id p14-v6so99053ywm.11 for ; Wed, 23 May 2018 21:17:10 -0700 (PDT) X-Gm-Message-State: ALKqPwfeaPAj3V3YzkL/Pkw2s/xas6v8ONK3hHtJtPDZrw8sSjOoIxKy XxxFDnfW3VFvuo0Cg//Bedgw3G5xsiGrzlLqrNsMgg== X-Google-Smtp-Source: AB8JxZqXIn3Bf0Gb7LgPJJdWw8aPn/+yJzH0P710e7lM4HmrPQ6O7t85M5bdK/CXtLayzuyRk6s5Uf3GJg5+4DYXF/k= X-Received: by 2002:a81:8605:: with SMTP id w5-v6mr2919936ywf.162.1527135430415; Wed, 23 May 2018 21:17:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Wed, 23 May 2018 21:16:39 -0700 (PDT) In-Reply-To: References: <201805230739.w4N7d34c062450@repo.freebsd.org> From: Eitan Adler Date: Wed, 23 May 2018 21:16:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r334077 - in head/sbin/devd: . tests To: Warner Losh Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 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: Thu, 24 May 2018 04:17:12 -0000 On 23 May 2018 at 13:09, Warner Losh wrote: > > > On Wed, May 23, 2018 at 1:39 AM, Eitan Adler wrote: >> >> Author: eadler >> Date: Wed May 23 07:39:02 2018 >> New Revision: 334077 >> URL: https://svnweb.freebsd.org/changeset/base/334077 >> >> Log: >> devd: correct two warnings >> >> - catching a polymorphic type by value >> - "output between 16 and 95 bytes into a destination of size 80" >> >> Modified: >> head/sbin/devd/devd.cc >> head/sbin/devd/tests/client_test.c >> >> Modified: head/sbin/devd/devd.cc >> >> ============================================================================== >> --- head/sbin/devd/devd.cc Wed May 23 07:39:00 2018 (r334076) >> +++ head/sbin/devd/devd.cc Wed May 23 07:39:02 2018 (r334077) >> @@ -1087,7 +1087,7 @@ event_loop(void) >> try { >> process_event(buffer); >> } >> - catch (std::length_error e) { >> + catch (const std::length_error& e) { >> devdlog(LOG_ERR, "Dropping event >> %s " >> "due to low memory", buffer); >> } >> >> Modified: head/sbin/devd/tests/client_test.c >> >> ============================================================================== >> --- head/sbin/devd/tests/client_test.c Wed May 23 07:39:00 2018 >> (r334076) >> +++ head/sbin/devd/tests/client_test.c Wed May 23 07:39:02 2018 >> (r334077) >> @@ -50,7 +50,7 @@ create_two_events(void) >> FILE *create_stdout; >> FILE *destroy_stdout; >> char mdname[80]; >> - char destroy_cmd[80]; >> + char destroy_cmd[95]; >> char *error; > > > I know it's just a test, but 95 seems equally as magical as 80... Agreed. I stole this number from the warning without too much thought. Tested that it still passed, and didn't do anything funky. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams