Parcourir la source

Fix warnings

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40492 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements il y a 15 ans
Parent
commit
569e482e33
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      lib/raster/put_row.c

+ 3 - 3
lib/raster/put_row.c

@@ -188,7 +188,7 @@ static void put_fp_data(int fd, char *null_buf, const void *rast,
     struct fileinfo *fcb = &R__.fileinfo[fd];
     int compressed = (fcb->open_mode == OPEN_NEW_COMPRESSED);
     XDR *xdrs = &fcb->xdrstream;
-    char *work_buf;
+    void *work_buf;
 
     if (row < 0 || row >= fcb->cellhd.rows)
 	return;
@@ -455,8 +455,8 @@ static void put_data_gdal(int fd, const void *rast, int row, int n,
     dst = work_buf;
 
     for (i = 0; i < n; i++) {
-	if (Rast_is_null_value(src, map_type) || zeros_r_nulls &&
-	    !*(CELL *) src)
+	if (Rast_is_null_value(src, map_type) ||
+	    (zeros_r_nulls && !*(CELL *) src))
 	    Rast_set_d_value(dst, null_val, map_type);
 	else
 	    memcpy(dst, src, size);