[postgis-tickets] r17510 - Raster cunit: Address scanf warning on Windows
Raul
raul at rmr.ninja
Wed Jun 12 04:38:52 PDT 2019
Author: algunenano
Date: 2019-06-12 04:38:52 -0700 (Wed, 12 Jun 2019)
New Revision: 17510
Modified:
trunk/raster/test/cunit/cu_gdal.c
Log:
Raster cunit: Address scanf warning on Windows
Closes #3252
Modified: trunk/raster/test/cunit/cu_gdal.c
===================================================================
--- trunk/raster/test/cunit/cu_gdal.c 2019-06-12 11:01:21 UTC (rev 17509)
+++ trunk/raster/test/cunit/cu_gdal.c 2019-06-12 11:38:52 UTC (rev 17510)
@@ -67,7 +67,9 @@
wkb_len = (int) ceil(((double) strlen(wkb_hex)) / 2);
wkb = (unsigned char *) rtalloc(sizeof(unsigned char) * wkb_len);
for (i = 0; i < wkb_len; i++) {
- sscanf(pos, "%2hhx", &wkb[i]);
+ int b = 0;
+ sscanf(pos, "%2x", &b);
+ wkb[i] = (unsigned char)b;
pos += 2;
}
More information about the postgis-tickets
mailing list