Fix GCC 13 issue
GCC identifies an uninitialized local variable that is later used.
Initialize the variable to a sane status.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I77a80a7c7e76c8964dfd4fb2d179aab3d7f03b03
diff --git a/peci_cmds.c b/peci_cmds.c
index 10e89d8..1714e6c 100644
--- a/peci_cmds.c
+++ b/peci_cmds.c
@@ -119,7 +119,7 @@
int c;
int i = 0;
char* cmd = NULL;
- EPECIStatus ret;
+ EPECIStatus ret = PECI_CC_SUCCESS;
uint8_t address = 0x30; // use default address of 48d
uint8_t domainId = 0; // use default domain ID of 0
uint8_t u8Size = 4; // default to a DWORD
@@ -1139,7 +1139,7 @@
}
if (!verbose)
{
- if (0 != ret)
+ if (PECI_CC_SUCCESS != ret)
{
printf("ERROR %d: command failed\n", ret);
}