]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a coverity warning about a no-op assert with-64 bit size_t
authorNick Mathewson <nickm@torproject.org>
Mon, 26 Jun 2017 14:31:13 +0000 (10:31 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 26 Jun 2017 14:31:13 +0000 (10:31 -0400)
This is CID 1403400

src/common/storagedir.c

index befcfe693fcdcbb04d5c3cfe0c2a77217443700b..4405731884c24307557e8bda6fe467f5a5fa569e 100644 (file)
@@ -210,7 +210,9 @@ storage_dir_read(storage_dir_t *d, const char *fname, int bin, size_t *sz_out)
   char *contents = read_file_to_str(path, flags, &st);
   if (contents && sz_out) {
     // it fits in RAM, so we know its size is less than SIZE_MAX
+#if UINT64_MAX > SIZE_MAX
     tor_assert((uint64_t)st.st_size <= SIZE_MAX);
+#endif
     *sz_out = (size_t) st.st_size;
   }