From: Jerin Jacob <[email protected]>

Fix the following error seen with clang 21.1.4

drivers/net/intel/iavf/iavf_vchnl.c:123:38: error: variable
'notify_byte' is uninitialized when passed as a const pointer
argument here [-Werror,-Wuninitialized-const-pointer]

Fixes: cb5c1b91f76f ("net/iavf: add thread for event callbacks")
Cc: [email protected]

Signed-off-by: Jerin Jacob <[email protected]>
---
 drivers/net/intel/iavf/iavf_vchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/iavf/iavf_vchnl.c 
b/drivers/net/intel/iavf/iavf_vchnl.c
index 460035d772..9ad39300c6 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -102,7 +102,7 @@ iavf_dev_event_post(struct rte_eth_dev *dev,
                void *param, size_t param_alloc_size)
 {
        struct iavf_event_handler *handler = &event_handler;
-       char notify_byte;
+       char notify_byte = 0;
        struct iavf_event_element *elem = rte_malloc(NULL, sizeof(*elem) + 
param_alloc_size, 0);
        if (!elem)
                return;
-- 
2.51.2

Reply via email to