Skip to contentSkip to conversation

orangefs: remove redundant assignment to variable buffer_index

PATCH New Colin Ian King 1 participant 1 message Oct 17, 2022

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

PATCH 1/1 orangefs: remove redundant assignment to variable buffer_index

The variable buffer_index is assigned a value that is never read, it is assigned just before the function returns. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
fs/orangefs/file.c:276:3: warning: Value stored to 'buffer_index' is never read [deadcode.DeadStores]

---
 fs/orangefs/file.c | 1 -
 1 file changed, 1 deletion(-)
fs/orangefs/file.c +0 -1
index 732661aa2680..167fa43b24f9 100644
@@ -273,7 +273,6 @@ ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inode,
 		gossip_debug(GOSSIP_FILE_DEBUG,
 			"%s(%pU): PUT buffer_index %d\n",
 			__func__, handle, buffer_index);
-		buffer_index = -1;
 	}
 	op_release(new_op);
 	return ret;
Signature · 1 line
2.37.3