mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-30 01:46:54 +00:00
Initialize resp_data to silence clang uninitialized warning
Clang flow analysis flags resp_data in process_response as possibly uninitialized when find_request returns NULL. kmod/src/net.c:533:6: error: variable 'resp_data' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] In practice the read is harmless because resp_func stays NULL in that path and call_resp_func only dereferences resp_data when resp_func is non-NULL. Initialize at declaration. Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -525,7 +525,7 @@ static int process_response(struct scoutfs_net_connection *conn,
|
||||
struct super_block *sb = conn->sb;
|
||||
struct message_send *msend;
|
||||
scoutfs_net_response_t resp_func = NULL;
|
||||
void *resp_data;
|
||||
void *resp_data = NULL;
|
||||
|
||||
spin_lock(&conn->lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user