mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Fix warning about unused variables
Commit 810903bdb9
("Import: pass a dive table to process_imported_dives()")
introduced the variables
struct dive *old_dive, *merged;
into process_imported_dives(), but never used them. It seems to be an
artifact of having split the function to use the try_to_merge_into()
helper function (that has those same variable names and _does_ use
them), but forgetting the original variables from the pre-split case.
Gcc understandably warns about it:
core/divelist.c: In function ‘process_imported_dives’:
core/divelist.c:1351:26: warning: unused variable ‘merged’ [-Wunused-variable]
struct dive *old_dive, *merged;
^~~~~~
core/divelist.c:1351:15: warning: unused variable ‘old_dive’ [-Wunused-variable]
struct dive *old_dive, *merged;
^~~~~~~~
and the trivial fix is to just remove that line that declares the stale
and unused variables.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7618240009
commit
d2d9821170
1 changed files with 0 additions and 1 deletions
|
@ -1348,7 +1348,6 @@ static bool try_to_merge_into(struct dive *dive_to_add, int idx, bool prefer_imp
|
||||||
void process_imported_dives(struct dive_table *import_table, bool prefer_imported, bool downloaded)
|
void process_imported_dives(struct dive_table *import_table, bool prefer_imported, bool downloaded)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
struct dive *old_dive, *merged;
|
|
||||||
int preexisting;
|
int preexisting;
|
||||||
bool sequence_changed = false;
|
bool sequence_changed = false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue