libstdc++: Fix warnings with -Wsystem-headers
authorJonathan Wakely <jwakely@redhat.com>
Wed, 24 Jun 2020 11:34:17 +0000 (12:34 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 24 Jun 2020 11:34:17 +0000 (12:34 +0100)
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
libstdc++-v3/include/std/charconv

index 4fc8850..ff5b450 100644 (file)
@@ -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;
index 77a72d4..8fbf640 100644 (file)
@@ -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;