Skip to contentSkip to conversation

UBIFS: remove unnecessary assignment

PATCH In review Stefan Agner 2 participants 2 messages Feb 11, 2018 – Mar 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBIFS: remove unnecessary assignment

Assigning a value of a variable to itself is not useful. This
fixes a warning shown when using clang:
warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]

---
 fs/ubifs/scan.c | 1 -
 1 file changed, 1 deletion(-)
fs/ubifs/scan.c +0 -1
index aab87340d3de..16f03d9929e5 100644
@@ -175,7 +175,6 @@ struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum,
 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
 		    int lnum, int offs)
 {
-	lnum = lnum;
 	dbg_scan("stop scanning LEB %d at offset %d", lnum, offs);
 	ubifs_assert(offs % c->min_io_size == 0);
 
Signature · 1 line
2.16.1
#1 lore raw

Am Sonntag, 11. Februar 2018, 23:17:36 CET schrieb Stefan Agner:

Quoted 4 lines

Assigning a value of a variable to itself is not useful. This fixes a warning shown when using clang:
warning: explicitly assigning value of variable of type 'int' to itself
[-Wself-assign]

Queued for next!

Thanks,
//richard