]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
get_time_seed(): silence warning emitted by Coverity Scan static analyzer 784/head
authorEven Rouault <even.rouault@spatialys.com>
Tue, 16 Aug 2022 09:11:55 +0000 (11:11 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Tue, 16 Aug 2022 09:11:58 +0000 (11:11 +0200)
It warns about the return of time() being truncated to 32 bit, which is
not an issue here.
(this warning was emitted because of the https://github.com/OSGeo/gdal
project embedding a copy of libjson-c and running Coverity Scan
analysis)

random_seed.c

index 7945824c7a9d78c4d4de5a72650d5d05551344f7..5b2155dbcdcab0be5289c18433590f3d962e51b7 100644 (file)
@@ -310,6 +310,7 @@ static int get_time_seed(void)
 {
        DEBUG_SEED("get_time_seed");
 
+       /* coverity[store_truncates_time_t] */
        return (unsigned)time(NULL) * 433494437;
 }
 #endif