Skip to content

Commit

Permalink
core-helper: assign val2 to avoid any static analysis warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Ian King <[email protected]>
  • Loading branch information
ColinIanKing committed Dec 21, 2023
1 parent ef51f58 commit b8c30af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ int stress_strcmp_munged(const char *s1, const char *s2)
*/
static ssize_t NOINLINE OPTIMIZE0 stress_get_stack_direction_helper(const uint8_t *val1)
{
const uint8_t val2 = 0;
const uint8_t val2 = *val1;
const ssize_t diff = &val2 - (const uint8_t *)val1;

return (diff > 0) - (diff < 0);
Expand Down

0 comments on commit b8c30af

Please sign in to comment.