Skip to content

libc/src/__support/memory_size.h:57: Possible missing else ? #82644

@dcb314

Description

@dcb314

Static analyser cppcheck says:

libc/src/__support/memory_size.h:57:12: style: Variable 'result' is reassigned a value before the old one has been used. [redundantAssignment]

Source code is

if (LIBC_UNLIKELY((value | other.value) < 0))
  result = -1;
result = value + other.value;

Maybe there is a missing else ?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions