This error is seen in build of type "minsize":
drivers/crypto/ccp/ccp_crypto.c:2897:31: error:
'b_info' may be used uninitialized [-Werror=maybe-uninitialized]
It looks to be a compiler issue because we return early
if rte_ring_dequeue() fails, before using b_info.
The variable is initialized to allow compiling with "minsize" option.
Fixes: 70f0f8a8d78c ("crypto/ccp: support burst enqueue/dequeue")
Signed-off-by: Cheryl Bansal <[email protected]>
---
drivers/crypto/ccp/ccp_crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index f966335be5..23a800a38c 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -2881,7 +2881,7 @@ process_ops_to_dequeue(struct ccp_qp *qp,
uint16_t nb_ops,
uint16_t *total_nb_ops)
{
- struct ccp_batch_info *b_info;
+ struct ccp_batch_info *b_info = NULL;
uint32_t cur_head_offset;
if (qp->b_info != NULL) {
--
2.43.0