diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-07 12:48:17 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-08 00:10:29 +0300 |
commit | d2d9821170c4417398c89308724ac7522555cf25 (patch) | |
tree | 0ca9c13bdd2f58416de66ec289acae3db044ef5c | |
parent | 7618240009661c471334c903df67194fbd870202 (diff) | |
download | subsurface-d2d9821170c4417398c89308724ac7522555cf25.tar.gz |
Fix warning about unused variables
Commit 810903bdb9db ("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>
-rw-r--r-- | core/divelist.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/divelist.c b/core/divelist.c index 916da4605..8d0fa77e5 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -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) { int i, j; - struct dive *old_dive, *merged; int preexisting; bool sequence_changed = false; |