[GRASS-SVN] r57612 - in grass/branches/releasebranch_6_4/display: d.colors d.nviz
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 7 04:22:44 PDT 2013
Author: hamish
Date: 2013-09-07 04:22:44 -0700 (Sat, 07 Sep 2013)
New Revision: 57612
Modified:
grass/branches/releasebranch_6_4/display/d.colors/get_info.c
grass/branches/releasebranch_6_4/display/d.nviz/main.c
Log:
avoid 'format not a string literal and no format arguments' warnings (merge r57357,9 from devbr6)
Modified: grass/branches/releasebranch_6_4/display/d.colors/get_info.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.colors/get_info.c 2013-09-07 11:16:28 UTC (rev 57611)
+++ grass/branches/releasebranch_6_4/display/d.colors/get_info.c 2013-09-07 11:22:44 UTC (rev 57612)
@@ -4,13 +4,13 @@
#include <grass/display.h>
#include <grass/raster.h>
#include <grass/colors.h>
+#include <grass/glocale.h>
#include "colors.h"
int get_map_info(char *name, char *mapset)
{
struct Colors colors;
struct Categories categories;
- char buff[128];
if (!name)
exit(0);
@@ -18,16 +18,12 @@
exit(0);
/* Reading color lookup table */
- if (G_read_cats(name, mapset, &categories) == -1) {
- sprintf(buff, "category file for [%s] not available", name);
- G_fatal_error(buff);
- }
+ if (G_read_cats(name, mapset, &categories) == -1)
+ G_fatal_error(_("Error reading category file for <%s>"), name);
/* Reading color lookup table */
- if (G_read_colors(name, mapset, &colors) == -1) {
- sprintf(buff, "color file for [%s] not available", name);
- G_fatal_error(buff);
- }
+ if (G_read_colors(name, mapset, &colors) == -1)
+ G_fatal_error(_("Unable to read color table for raster map <%s>"), name);
interact(&categories, &colors, name, mapset);
Modified: grass/branches/releasebranch_6_4/display/d.nviz/main.c
===================================================================
--- grass/branches/releasebranch_6_4/display/d.nviz/main.c 2013-09-07 11:16:28 UTC (rev 57611)
+++ grass/branches/releasebranch_6_4/display/d.nviz/main.c 2013-09-07 11:22:44 UTC (rev 57612)
@@ -188,7 +188,7 @@
/* Set Image name */
if (parm.name->answer)
- sprintf(img_name, parm.name->answer);
+ sprintf(img_name, "%s", parm.name->answer);
else
sprintf(img_name, "NVIZ");
@@ -388,8 +388,7 @@
G_close_cell(fd);
fclose(fp);
- sprintf(buf1, _("Created NVIZ script <%s>."), outfile);
- G_done_msg(buf1);
+ G_done_msg(_("Created NVIZ script <%s>."), outfile);
exit(EXIT_SUCCESS);
More information about the grass-commit
mailing list