[PATCH] Fix compile warning

Miika Turkia miika.turkia at gmail.com
Tue Aug 5 21:39:23 PDT 2014


warning: format not a string literal and no format arguments

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 planner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/planner.c b/planner.c
index 3efa702..60751fc 100644
--- a/planner.c
+++ b/planner.c
@@ -534,7 +534,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
 		return;
 
 	if (error) {
-		snprintf(temp, sizeof(temp),
+		snprintf(temp, sizeof(temp), "%s",
 			 translate("gettextFromC", "Decompression calculation aborted due to excessive time"));
 		snprintf(buffer, sizeof(buffer), "<span style='color: red;'>%s </span> %s<br>",
 				translate("gettextFromC", "Warning:"), temp);
-- 
1.9.1



More information about the subsurface mailing list