[PATCH 7/7] planner.c: fix missing brances warning

Lubomir I. Ivanov neolit123 at gmail.com
Wed Sep 23 07:38:43 PDT 2015


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

for a 'struct gasmix' initialization, the 'permille' value
from franction_t should have it's own braces.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 planner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/planner.c b/planner.c
index d4bf478..67d999f 100644
--- a/planner.c
+++ b/planner.c
@@ -536,7 +536,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
 	char *temp = (char *)malloc(sz_temp);
 	char buf[1000], *deco;
 	int len, lastdepth = 0, lasttime = 0, lastsetpoint = -1, newdepth = 0, lastprintdepth = 0, lastprintsetpoint = -1;
-	struct gasmix lastprintgasmix = { -1, -1 };
+	struct gasmix lastprintgasmix = {{ -1 }, { -1 }};
 	struct divedatapoint *dp = diveplan->dp;
 	bool gaschange_after = !plan_verbatim;
 	bool gaschange_before;
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list