Browse Source

string format fixes (from Volker Froehlich)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59570 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 11 years ago
parent
commit
bdea8ae6fd
2 changed files with 3 additions and 3 deletions
  1. 2 2
      lib/raster3d/windowio.c
  2. 1 1
      misc/m.cogo/main.c

+ 2 - 2
lib/raster3d/windowio.c

@@ -71,7 +71,7 @@ static void Rast3d_getFullWindowPath(char *path, const char *windowName)
 	windowName++;
 	windowName++;
 
 
     if (strchr(windowName, GRASS_DIRSEP) || strchr(windowName, HOST_DIRSEP)) {
     if (strchr(windowName, GRASS_DIRSEP) || strchr(windowName, HOST_DIRSEP)) {
-	sprintf(path, windowName);
+	sprintf(path, "%s", windowName);
 	return;
 	return;
     }
     }
 
 
@@ -108,7 +108,7 @@ static void Rast3d_getFullWindowPath(char *path, const char *windowName)
    else
    else
    G_file_name (path, RASTER3D_WINDOW_DATABASE, windowName, G_mapset ());
    G_file_name (path, RASTER3D_WINDOW_DATABASE, windowName, G_mapset ());
    } else
    } else
-   sprintf (path, windowName);
+   sprintf (path, "%s", windowName);
    p = path;
    p = path;
    slash = NULL;
    slash = NULL;
    while (*p != 0) {
    while (*p != 0) {

+ 1 - 1
misc/m.cogo/main.c

@@ -329,7 +329,7 @@ int main(int argc, char **argv)
 
 
 	if (!parse_line(cptr, &record)) {
 	if (!parse_line(cptr, &record)) {
 	    if (verbose)
 	    if (verbose)
-		G_warning(_("Input parse error on line %d"), linenum);
+		G_warning(_("Input parse error on line %lu"), linenum);
 	    continue;
 	    continue;
 	}
 	}