Fossil SCM

Update the built-in Pikchr implementation to fix a compiler warning.

drh 2021-11-04 18:37 trunk
Commit 7f7df29bfc47efc036815a8fabb85928adba6f4974142f285aa561be0656c0d4
1 file changed +1 -1
+1 -1
--- src/pikchr.c
+++ src/pikchr.c
@@ -6272,11 +6272,11 @@
62726272
/*
62736273
** Round a PNum into the nearest integer
62746274
*/
62756275
static int pik_round(PNum v){
62766276
if( isnan(v) ) return 0;
6277
- if( v < -2147483647 ) return -2147483648;
6277
+ if( v < -2147483647 ) return (-2147483647-1);
62786278
if( v >= 2147483647 ) return 2147483647;
62796279
return (int)v;
62806280
}
62816281
62826282
/*
62836283
--- src/pikchr.c
+++ src/pikchr.c
@@ -6272,11 +6272,11 @@
6272 /*
6273 ** Round a PNum into the nearest integer
6274 */
6275 static int pik_round(PNum v){
6276 if( isnan(v) ) return 0;
6277 if( v < -2147483647 ) return -2147483648;
6278 if( v >= 2147483647 ) return 2147483647;
6279 return (int)v;
6280 }
6281
6282 /*
6283
--- src/pikchr.c
+++ src/pikchr.c
@@ -6272,11 +6272,11 @@
6272 /*
6273 ** Round a PNum into the nearest integer
6274 */
6275 static int pik_round(PNum v){
6276 if( isnan(v) ) return 0;
6277 if( v < -2147483647 ) return (-2147483647-1);
6278 if( v >= 2147483647 ) return 2147483647;
6279 return (int)v;
6280 }
6281
6282 /*
6283

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button