diff mbox series

core/pldm: Fix unused-but-set-variable error

Message ID 20260821151441.81804-1-arbab@linux.ibm.com
State New
Headers show
Series core/pldm: Fix unused-but-set-variable error | expand

Commit Message

Reza Arbab Aug. 21, 2026, 3:14 p.m. UTC
Newer GCC are catching this:

core/pldm/pldm-file-io-requests.c: In function 'write_file_req':
core/pldm/pldm-file-io-requests.c:252:30: error: variable 'current_ptr' set but not used [-Werror=unused-but-set-variable=]
  252 |         void *response_msg, *current_ptr, *payload_data;
      |                              ^~~~~~~~~~~

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
---
 core/pldm/pldm-file-io-requests.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/core/pldm/pldm-file-io-requests.c b/core/pldm/pldm-file-io-requests.c
index 7f3cf70a7..2c1b24523 100644
--- a/core/pldm/pldm-file-io-requests.c
+++ b/core/pldm/pldm-file-io-requests.c
@@ -249,7 +249,7 @@  int pldm_file_io_read_file(uint32_t file_handle, uint32_t file_length,
 static int write_file_req(uint32_t file_handle, uint32_t pos,
 			  const void *buf, uint64_t len)
 {
-	void *response_msg, *current_ptr, *payload_data;
+	void *response_msg, *payload_data;
 	uint32_t total_write, resp_length, request_length;
 	size_t response_len, payload_len;
 	uint8_t completion_code;
@@ -283,7 +283,6 @@  static int write_file_req(uint32_t file_handle, uint32_t pos,
 			+ offsetof(struct pldm_write_file_req, file_data);
 
 	memcpy(payload_data, buf, len);
-	current_ptr = payload_data;
 	num_transfers = 1;
 	total_write = 0;
 
@@ -344,7 +343,6 @@  static int write_file_req(uint32_t file_handle, uint32_t pos,
 		}
 
 		total_write += resp_length;
-		current_ptr += resp_length;
 		free(response_msg);
 
 		if (total_write == len)