From owner-svn-src-head@FreeBSD.ORG Mon Mar 19 19:01:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8017106564A; Mon, 19 Mar 2012 19:01:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92E698FC12; Mon, 19 Mar 2012 19:01:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2JJ1YSl081876; Mon, 19 Mar 2012 19:01:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2JJ1YJV081874; Mon, 19 Mar 2012 19:01:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203191901.q2JJ1YJV081874@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Mar 2012 19:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233193 - head/contrib/libstdc++/include/bits X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 19 Mar 2012 19:01:34 -0000 Author: dim Date: Mon Mar 19 19:01:34 2012 New Revision: 233193 URL: http://svn.freebsd.org/changeset/base/233193 Log: Add explicit braces to avoid dangling else in stl_tree.h. This silences the following warning produced by clang trunk: In file included from /usr/src/sbin/devd/devd.cc:91: In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64: /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else] else ^ MFC after: 3 days Modified: head/contrib/libstdc++/include/bits/stl_tree.h Modified: head/contrib/libstdc++/include/bits/stl_tree.h ============================================================================== --- head/contrib/libstdc++/include/bits/stl_tree.h Mon Mar 19 18:54:01 2012 (r233192) +++ head/contrib/libstdc++/include/bits/stl_tree.h Mon Mar 19 19:01:34 2012 (r233193) @@ -982,10 +982,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } iterator __j = iterator(__y); if (__comp) - if (__j == begin()) - return pair(_M_insert(__x, __y, __v), true); - else - --__j; + { + if (__j == begin()) + return pair(_M_insert(__x, __y, __v), true); + else + --__j; + } if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) return pair(_M_insert(__x, __y, __v), true); return pair(__j, false);