[PATCH] Close snprintf warning

Anton Lundin glance at acc.umu.se
Thu Jun 26 23:04:46 PDT 2014


Gcc yells:
warning: format not a string literal and no format arguments

This closes that warning.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 planner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/planner.c b/planner.c
index 13a9a48..fcdfe01 100644
--- a/planner.c
+++ b/planner.c
@@ -634,7 +634,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
 		lastdepth = dp->depth;
 	} while ((dp = nextdp) != NULL);
 
-	snprintf(temp, sizeof(temp), translate("gettextFromC", "Gas consumption:"));
+	snprintf(temp, sizeof(temp), "%s", translate("gettextFromC", "Gas consumption:"));
 	len += snprintf(buffer + len, sizeof(buffer) - len, "</tbody></table></div><div><br>%s<br>", temp);
 	for (gasidx = 0; gasidx < MAX_CYLINDERS; gasidx++) {
 		double volume;
-- 
1.9.1



More information about the subsurface mailing list