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>
This commit is contained in:
parent
8c8943bf00
commit
0778e3e18c
@ -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 };
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user