summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogexportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-10-25 12:05:28 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-27 07:36:28 -0700
commit0778e3e18c191496ab650434082fa9b09b2bd9ef (patch)
tree816f1b0dd8e6705da1213b73e68d1100ab3805a5 /qt-ui/divelogexportdialog.cpp
parent8c8943bf004d47ff41166071431f212dc8067e0f (diff)
downloadsubsurface-0778e3e18c191496ab650434082fa9b09b2bd9ef.tar.gz
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 <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogexportdialog.cpp')
-rw-r--r--qt-ui/divelogexportdialog.cpp2
1 files changed, 1 insertions, 1 deletions
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 };