svn commit: r233297 - stable/9/contrib/libstdc++/include/bits
Dimitry Andric
dim at FreeBSD.org
Thu Mar 22 09:47:10 UTC 2012
Author: dim
Date: Thu Mar 22 09:47:10 2012
New Revision: 233297
URL: http://svn.freebsd.org/changeset/base/233297
Log:
MFC r233193:
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
^
Modified:
stable/9/contrib/libstdc++/include/bits/stl_tree.h
Directory Properties:
stable/9/contrib/libstdc++/ (props changed)
Modified: stable/9/contrib/libstdc++/include/bits/stl_tree.h
==============================================================================
--- stable/9/contrib/libstdc++/include/bits/stl_tree.h Thu Mar 22 09:42:27 2012 (r233296)
+++ stable/9/contrib/libstdc++/include/bits/stl_tree.h Thu Mar 22 09:47:10 2012 (r233297)
@@ -982,10 +982,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
iterator __j = iterator(__y);
if (__comp)
- if (__j == begin())
- return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
- else
- --__j;
+ {
+ if (__j == begin())
+ return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
+ else
+ --__j;
+ }
if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
return pair<iterator, bool>(_M_insert(__x, __y, __v), true);
return pair<iterator, bool>(__j, false);
More information about the svn-src-stable-9
mailing list