]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/picojson: Pragma out limit comparison warning
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 06:28:34 +0000 (02:28 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 17 Jul 2020 18:18:17 +0000 (14:18 -0400)
intmax_t may or may not be identical to int64_t, depending on
platform. On our platform, it is.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/picojson/picojson.h

index e85b66f379c8587453c669c1a5b356429f1a1108..ceaeb5ba8452d4092e6a59ee946a4aef75616c3e 100644 (file)
@@ -903,6 +903,8 @@ template <typename Context, typename Iter> inline bool _parse(Context &ctx, inpu
         return false;
       }
 #ifdef PICOJSON_USE_INT64
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wtautological-type-limit-compare"
       {
         errno = 0;
         intmax_t ival = strtoimax(num_str.c_str(), &endp, 10);
@@ -912,6 +914,7 @@ template <typename Context, typename Iter> inline bool _parse(Context &ctx, inpu
           return true;
         }
       }
+#pragma clang diagnostic pop
 #endif
       f = strtod(num_str.c_str(), &endp);
       if (endp == num_str.c_str() + num_str.size()) {