From owner-svn-src-head@FreeBSD.ORG Fri Mar 8 01:45:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3206107 for ; Fri, 8 Mar 2013 01:45:52 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-we0-x235.google.com (mail-we0-x235.google.com [IPv6:2a00:1450:400c:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id 8DB97FE0 for ; Fri, 8 Mar 2013 01:45:52 +0000 (UTC) Received: by mail-we0-f181.google.com with SMTP id t44so399353wey.26 for ; Thu, 07 Mar 2013 17:45:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HhY+Vg9FV2a9+kG0TIfXjg2JifwJz4uNyArS21BjVrw=; b=kxB7C9hfC/ij3iPRopSVirbc46K0I6FWX4htUCK9G5TE+wD4tUH+/8po0800b7xbAE T9xbgpmaNkUvyl8nCsLe7HaEAINaxAp5IINALbg0Ebe6yo67t3QQJptByO9Lya6cbjKu utTVcTtALfINMcEf9J0f/9rmxT6Xninv9ymjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=HhY+Vg9FV2a9+kG0TIfXjg2JifwJz4uNyArS21BjVrw=; b=HjzDe+fG97eXln+DiHyurVhOFuv+X0z6RbS8VbcNKGFJQ4YN7RIJIx5AACyq+DeWTN 9FNslZuL62AjLIaPdIhkKKpnwDmky6GQ/bMRyBc8rPApxNDbEZKusCMhdwMrJoxrR/jK KkroGmHsKN5/abzIT2J/LmddZGrkGcA7Be25qibI1F2z5Hv9NRt5XvtFmtJ2UjzdVoN/ O0A9Fv9WgqZVq8aTtF6SREmug+v28q3YCmVSP1zBMaa6HGPlhkWzvEe5WtGYdprl3h7x qWlYCkhd+FyAmt4t+6GPYBrtrJpSkSNRq2Tq88Z+bxyCcW4j08ubq30/39rcqdkERaYV nXeQ== X-Received: by 10.194.89.169 with SMTP id bp9mr552853wjb.57.1362707150899; Thu, 07 Mar 2013 17:45:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.179.194 with HTTP; Thu, 7 Mar 2013 17:45:20 -0800 (PST) In-Reply-To: <51391C1E.5030905@FreeBSD.org> References: <201303072216.r27MGZ1b031061@svn.freebsd.org> <513914C4.4010001@FreeBSD.org> <51391C1E.5030905@FreeBSD.org> From: Eitan Adler Date: Thu, 7 Mar 2013 20:45:20 -0500 Message-ID: Subject: Re: svn commit: r247960 - head/cddl/contrib/opensolaris/tools/ctf/cvt To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmQk2J4WhUz0YNWkg4fFSgOP8+BpXy5KuBF3WZQjyRfyf+gCbEF9daFiyM/b1Ci59JSwcpc Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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, 08 Mar 2013 01:45:53 -0000 On 7 March 2013 18:00, Dimitry Andric wrote: > On 2013-03-07 23:29, Andriy Gapon wrote: > ... > >> I was not really kidding when I said that this change, as is, is a nop: > > ... > >>> + bname = strrchr(match.iim_name, '/'); >>> + bname = bname == NULL ? match.iim_name : bname + >>> 1; >> >> >> It would probably make sense to make use of bname after going to through >> all the >> trouble of calculating it: >> >>> match.iim_file = match.iim_name; >> >> >> Should be match.iim_file = bname ? > > > Yes, I actually had this in my test code, and committed the wrong diff > by accident. :( Fixed in r247962, in any case. > > > >> Surprised that clang hasn't warned you about this one :-) > > > Clang currently does not have the -Wunused-but-set-variable warning; it > is apparently available in the static analyzer. On the other hand, that > warning is one of the most annoying ones that newer gcc's have. :-) I have found real bugs in FreeBSD's code base as a result of this warning, but the vast majority were more annoying than useful. -- Eitan Adler