Fix Coverity CID 1506067 in Debug.cpp

This commit is contained in:
tomcw 2021-07-28 14:09:22 +01:00
parent 405de2be14
commit c20c9c2c9c
2 changed files with 11 additions and 3 deletions

View File

@ -5811,7 +5811,6 @@ Update_t CmdOutputPrintf (int nArgs)
std::vector<Arg_t> aValues;
Arg_t entry;
entry.sArg[0] = 0;
int iValue = 0;
int nValue = 0;

View File

@ -1286,11 +1286,20 @@ const DisasmData_t* pDisasmData; // If != NULL then bytes are marked up as data
struct Arg_t
{
Arg_t() // ctor added to fix Coverity (static analysis) defect
{
sArg[0] = 0;
nArgLen = 0;
nValue = 0;
eToken = TOKEN_ALPHANUMERIC; // default
bType = 0;
eDevice = DEV_MEMORY; // default
bSymbol = 0;
}
char sArg[ MAX_ARG_LEN+1 ]; // Array chars comes first, for alignment, GH#481 echo 55 char limit
int nArgLen; // Needed for TextSearch "ABC\x00"
WORD nValue ; // 2
// WORD nVal1 ; // 2
// WORD nVal2 ; // 2 If we have a Len (,)
// Enums and Bools should come last for alignment
ArgToken_e eToken ; // 1/2/4
int bType ; // 1/2/4 // Flags of ArgType_e