From c536f939e969335ce01ee894e5acf48b495f8fa8 Mon Sep 17 00:00:00 2001 From: Azure Crimson Date: Fri, 4 Jun 2021 01:41:44 +0000 Subject: [PATCH] Fix compilation warnings with GCC 11.0.1 I fixed the following error messages by applying an upstream optimization, the specific commit can be found here https://sqlite.org/src/info/e95138f5f4febde5 error: implicit conversion from 'long long' to 'double' changes valuefrom 9223372036854775806 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion] if( n==0 && r>=0 && r=0 && r+4503599627370496.0 ){ + /* The value has no fractional part so there is nothing to round */ + }else if( n==0 ){ + r = (double)((sqlite_int64)(r+(r<0?-0.5:+0.5))); }else{ zBuf = sqlite3_mprintf("%.*f",n,r); if( zBuf==0 ){