From 25920dd18ad12ea501309b1487366e22f35db631 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 24 Jun 2020 12:34:17 +0100 Subject: [PATCH] libstdc++: Fix warnings with -Wsystem-headers libstdc++-v3/ChangeLog: * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers. * include/std/charconv (__detail::__to_chars): Avoid -Wsign-compare warning. --- libstdc++-v3/include/bits/stl_algobase.h | 3 +++ libstdc++-v3/include/std/charconv | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 4fc8850d707..ff5b4505a08 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -2092,14 +2092,17 @@ _GLIBCXX_END_NAMESPACE_ALGO if (__pred(__first)) return __first; ++__first; + // FALLTHRU case 2: if (__pred(__first)) return __first; ++__first; + // FALLTHRU case 1: if (__pred(__first)) return __first; ++__first; + // FALLTHRU case 0: default: return __last; diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv index 77a72d40dd0..8fbf64058ee 100644 --- a/libstdc++-v3/include/std/charconv +++ b/libstdc++-v3/include/std/charconv @@ -142,7 +142,7 @@ namespace __detail 'u', 'v', 'w', 'x', 'y', 'z' }; - while (__val >= __base) + while (__val >= (unsigned)__base) { auto const __quo = __val / __base; auto const __rem = __val % __base; -- 2.30.2