[PATCH v2 079/148] net/ice/base: ignore snprintf return value

Anatoly Burakov anatoly.burakov at intel.com
Wed Jun 12 17:01:13 CEST 2024


From: Ian Stokes <ian.stokes at intel.com>

Certain compilation targets were generating compile errors due to snprintf
return value not being checked. Fix it by ignoring the return value explicitly.

Signed-off-by: Waldemar Dworakowski <waldemar.dworakowski at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
 drivers/net/ice/base/ice_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 82783cfecd..891b7f0aa8 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -876,7 +876,7 @@ void ice_print_rollback_msg(struct ice_hw *hw)
 	orom = &hw->flash.orom;
 	nvm = &hw->flash.nvm;
 
-	SNPRINTF(nvm_str, sizeof(nvm_str), "%x.%02x 0x%x %d.%d.%d",
+	(void)SNPRINTF(nvm_str, sizeof(nvm_str), "%x.%02x 0x%x %d.%d.%d",
 		 nvm->major, nvm->minor, nvm->eetrack, orom->major,
 		 orom->build, orom->patch);
 	ice_warn(hw,
-- 
2.43.0



More information about the dev mailing list