Skip to contentSkip to conversation

common/cnxk: fix build failure

PATCH Applied Tejasree Kondoj 4 participants 5 messages Oct 27, 2021 – Oct 29, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/cnxk: fix build failure

Fixing build failure with EXTRA_CFLAGS='-O1'.

Fixes d85f9749f915 ("common/cnxk: add hash generation API")
---
 drivers/common/cnxk/roc_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/cnxk/roc_hash.c +1 -1
index 092286e41e..4a34c7fbf8 100644
@@ -23,7 +23,7 @@ roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash)
 			       0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476,
 			       0xC3D2E1F0};
 	int i;
-	uint32_t temp;		/* Temporary word value */
+	uint32_t temp = 0;	/* Temporary word value */
 	uint32_t W[80];		/* Word sequence */
 	uint32_t A, B, C, D, E; /* Word buffers */
 
Signature · 1 line
2.27.0
#3 lore raw
In reply to Tejasree Kondoj
Quoted 2 lines · Tejasree Kondoj

Fixing build failure with EXTRA_CFLAGS='-O1'.

For future, can you please provide a little more detail in the commit log related to the build error,
like which compiler or compiler version cause the issue, what is the build error and put part of the log in commit log that can help to people searching for the error log.
Plus if the build error is genuine build error, or if you are just silencing compiler false positive.

Quoted 22 lines
Fixes d85f9749f915 ("common/cnxk: add hash generation API")
---
  drivers/common/cnxk/roc_hash.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/cnxk/roc_hash.c +1 -1
index 092286e41e..4a34c7fbf8 100644
@@ -23,7 +23,7 @@ roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash)
  			       0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476,
  			       0xC3D2E1F0};
  	int i;
-	uint32_t temp;		/* Temporary word value */
+	uint32_t temp = 0;	/* Temporary word value */
  	uint32_t W[80];		/* Word sequence */
  	uint32_t A, B, C, D, E; /* Word buffers */
 
#4 lore raw

Sure Ferruh.

Thanks
Tejasree

Quoted 46 lines

-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Thursday, October 28, 2021 11:02 PM
To: Tejasree Kondoj <[email protected]>; Akhil Goyal <[email protected]>; [email protected]; YuX <[email protected]>; Longfeng Liang <[email protected]>
Cc: Anoob Joseph <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH] common/cnxk: fix build failure

External Email

----------------------------------------------------------------------

Quoted 2 lines · Tejasree Kondoj

Fixing build failure with EXTRA_CFLAGS='-O1'.

For future, can you please provide a little more detail in the commit log related to the build error, like which compiler or compiler version cause the issue, what is the build error and put part of the log in commit log that can help to people searching for the error log.
Plus if the build error is genuine build error, or if you are just silencing compiler false positive.

Quoted 13 lines
Fixes d85f9749f915 ("common/cnxk: add hash generation API")
---
  drivers/common/cnxk/roc_hash.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/common/cnxk/roc_hash.c index 092286e41e..4a34c7fbf8 100644

drivers/common/cnxk/roc_hash.c roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash) · line 23

Quoted 1 line
drivers/common/cnxk/roc_hash.c +0 -0
@@ -23,7 +23,7 @@ roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash)
  			       0x67452301, 0xEFCDAB89, 0x98BADCFE,

0x10325476,

Quoted 8 lines
drivers/common/cnxk/roc_hash.c +1 -1
  			       0xC3D2E1F0};
  	int i;
-	uint32_t temp;		/* Temporary word value */
+	uint32_t temp = 0;	/* Temporary word value */
  	uint32_t W[80];		/* Word sequence */
  	uint32_t A, B, C, D, E; /* Word buffers */