summaryrefslogtreecommitdiff
path: root/external/boost
diff options
context:
space:
mode:
authorAdam Co <rattles2013@gmail.com>2014-04-20 14:35:30 +0300
committerMichael Stahl <mstahl@redhat.com>2014-04-22 12:40:29 +0200
commit0fbc3a87f78663d9ace98221024f581d5e0c86d9 (patch)
tree8ef1c8b4d23aaa5220f5a946297b47db7c9a936c /external/boost
parentaa555c725b9529d5ddb61ae75b65942b4c35b47a (diff)
Boost Patch - Change '*b' to a variable, to remove GCC 4.7.3 -Wtype-limits
Change-Id: Ic7bac90c9b77490c47e5ddd2005453290374b7b2 Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'external/boost')
-rw-r--r--external/boost/UnpackedTarball_boost.mk2
-rw-r--r--external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.011
-rw-r--r--external/boost/boost.property_tree.Wtype-limits.warnings.patch.141
3 files changed, 42 insertions, 12 deletions
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 5be550ee51ea..29c478c1b030 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -54,7 +54,7 @@ boost_patches += boost.preprocessor.Wundef.warnings.patch
# https://svn.boost.org/trac/boost/ticket/9892
boost_patches += boost.property_tree.Wshadow.warnings.patch.1
# https://svn.boost.org/trac/boost/ticket/9893
-boost_patches += boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0
+boost_patches += boost.property_tree.Wtype-limits.warnings.patch.1
# https://svn.boost.org/trac/boost/ticket/9894
boost_patches += boost.ptr_container.Wshadow.warnings.patch
# https://svn.boost.org/trac/boost/ticket/9895
diff --git a/external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0 b/external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0
deleted file mode 100644
index 4ad7b9be4c38..000000000000
--- a/external/boost/boost.property_tree.Wtautological-constant-out-of-range-compare.warnings.patch.0
+++ /dev/null
@@ -1,11 +0,0 @@
---- boost/property_tree/detail/json_parser_write.hpp
-+++ boost/property_tree/detail/json_parser_write.hpp
-@@ -33,7 +33,7 @@
- // We escape everything outside ASCII, because this code can't
- // handle high unicode characters.
- if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) ||
-- (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF))
-+ (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && static_cast<typename std::basic_string<Ch>::traits_type::int_type>(*b) <= 0xFF))
- result += *b;
- else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b');
- else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f');
diff --git a/external/boost/boost.property_tree.Wtype-limits.warnings.patch.1 b/external/boost/boost.property_tree.Wtype-limits.warnings.patch.1
new file mode 100644
index 000000000000..e4c7ede0e3be
--- /dev/null
+++ b/external/boost/boost.property_tree.Wtype-limits.warnings.patch.1
@@ -0,0 +1,41 @@
+diff -ur boost.org/boost/property_tree/detail/json_parser_write.hpp boost/boost/property_tree/detail/json_parser_write.hpp
+--- boost.org/boost/property_tree/detail/json_parser_write.hpp 2014-04-20 13:27:59.126224368 +0300
++++ boost/boost/property_tree/detail/json_parser_write.hpp 2014-04-20 13:32:35.206229552 +0300
+@@ -29,25 +29,26 @@
+ typename std::basic_string<Ch>::const_iterator e = s.end();
+ while (b != e)
+ {
++ typename std::basic_string<Ch>::traits_type::int_type bDref = *b;
+ // This assumes an ASCII superset. But so does everything in PTree.
+ // We escape everything outside ASCII, because this code can't
+ // handle high unicode characters.
+- if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) ||
+- (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF))
+- result += *b;
+- else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b');
+- else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f');
+- else if (*b == Ch('\n')) result += Ch('\\'), result += Ch('n');
+- else if (*b == Ch('\r')) result += Ch('\\'), result += Ch('r');
+- else if (*b == Ch('/')) result += Ch('\\'), result += Ch('/');
+- else if (*b == Ch('"')) result += Ch('\\'), result += Ch('"');
+- else if (*b == Ch('\\')) result += Ch('\\'), result += Ch('\\');
++ if (bDref == 0x20 || bDref == 0x21 || (bDref >= 0x23 && bDref <= 0x2E) ||
++ (bDref >= 0x30 && bDref <= 0x5B) || (bDref >= 0x5D && bDref <= 0xFF))
++ result += bDref;
++ else if (bDref == Ch('\b')) result += Ch('\\'), result += Ch('b');
++ else if (bDref == Ch('\f')) result += Ch('\\'), result += Ch('f');
++ else if (bDref == Ch('\n')) result += Ch('\\'), result += Ch('n');
++ else if (bDref == Ch('\r')) result += Ch('\\'), result += Ch('r');
++ else if (bDref == Ch('/')) result += Ch('\\'), result += Ch('/');
++ else if (bDref == Ch('"')) result += Ch('\\'), result += Ch('"');
++ else if (bDref == Ch('\\')) result += Ch('\\'), result += Ch('\\');
+ else
+ {
+ const char *hexdigits = "0123456789ABCDEF";
+ typedef typename make_unsigned<Ch>::type UCh;
+ unsigned long u = (std::min)(static_cast<unsigned long>(
+- static_cast<UCh>(*b)),
++ static_cast<UCh>(bDref)),
+ 0xFFFFul);
+ int d1 = u / 4096; u -= d1 * 4096;
+ int d2 = u / 256; u -= d2 * 256;