mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue