Skip to content

Commit

Permalink
address analysis warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Nov 9, 2024
1 parent f92560c commit f1c520c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/ui/viewmodels/TriggerConditionViewModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ void TriggerConditionViewModel::SetOperand(const IntModelProperty& pTypeProperty
{
if (rc_operand_is_memref(&operand) && operand.value.memref->value.memref_type == RC_MEMREF_TYPE_MODIFIED_MEMREF)
{
const auto* pModifiedMemref = reinterpret_cast<rc_modified_memref_t*>(operand.value.memref);
GSL_SUPPRESS_TYPE1 const auto* pModifiedMemref = reinterpret_cast<rc_modified_memref_t*>(operand.value.memref);
if (pModifiedMemref->modifier_type != RC_OPERATOR_INDIRECT_READ)
{
// if the modified memref is not an indirect read, the size and address are stored in the modifier.
Expand Down Expand Up @@ -704,7 +704,7 @@ static ra::ByteAddress GetParentAddress(const rc_modified_memref_t* pModifiedMem
return pModifiedMemref->parent.value.memref->address;

case RC_MEMREF_TYPE_MODIFIED_MEMREF:
const auto* pModifiedParentMemref =
GSL_SUPPRESS_TYPE1 const auto* pModifiedParentMemref =
reinterpret_cast<const rc_modified_memref_t*>(pModifiedMemref->parent.value.memref);

// chained pointer
Expand All @@ -724,14 +724,14 @@ static ra::ByteAddress GetIndirectAddressFromOperand(const rc_operand_t* pOperan
if (pOperand->value.memref->value.memref_type != RC_MEMREF_TYPE_MODIFIED_MEMREF)
return nAddress;

const auto* pModifiedMemref = reinterpret_cast<const rc_modified_memref_t*>(pOperand->value.memref);
GSL_SUPPRESS_TYPE1 const auto* pModifiedMemref = reinterpret_cast<const rc_modified_memref_t*>(pOperand->value.memref);
if (pModifiedMemref->modifier_type != RC_OPERATOR_INDIRECT_READ)
return nAddress;

if (pPointerAddress)
*pPointerAddress = GetParentAddress(pModifiedMemref);

rc_typed_value_t value, offset;
rc_typed_value_t value{}, offset;
offset.type = RC_VALUE_TYPE_UNSIGNED;
offset.value.u32 = nAddress;
rc_evaluate_operand(&value, &pModifiedMemref->parent, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/viewmodels/TriggerViewModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ void TriggerViewModel::UpdateConditionColors(const rc_trigger_t* pTrigger)
{
// when a condset is paused, processing stops when the first pause condition is true. only highlight it
bool bFirstPause = true;
rc_condition_t* pPauseConditions = rc_condset_get_conditions(pSelectedGroup->m_pConditionSet);
const rc_condition_t* pPauseConditions = rc_condset_get_conditions(pSelectedGroup->m_pConditionSet);
const rc_condition_t* pEndPauseConditions = pPauseConditions + pSelectedGroup->m_pConditionSet->num_pause_conditions;

rc_condition_t* pCondition = pSelectedGroup->m_pConditionSet->conditions;
Expand Down

0 comments on commit f1c520c

Please sign in to comment.