From 0778e3e18c191496ab650434082fa9b09b2bd9ef Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 25 Oct 2014 12:05:28 +0300 Subject: divelogexportdialog.cpp: fix a 'uninitialized variable' warning DiveLogExportDialog::export_depths() We set a default value of 'unit' which will silence the warning itself. Then hope that the compiler will respect the argument order i.e. call get_depth_units() (which sets 'unit') before using *unit as the last argument passsed to put_format(). Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/divelogexportdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index a0fbc50fd..4e00b4e2a 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -322,7 +322,7 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte struct dive *dive; depth_t depth; int i; - const char **unit; + const char **unit = NULL; struct membuffer buf = { 0 }; -- cgit v1.2.3-70-g09d2