Using signed int literal '1' in left shift can lead to undefined
behavior if the shift amount causes overflow of a signed int. Use
UINT32_C(1) since the result is stored in a uint32_t variable.
CID#
1568482
Follow-up for
e9f781a5a4721d3e58798b37e30bb4dcdbe54c02
FOREACH_ELEMENT(i, breakpoint_info_table)
if (FLAGS_SET(i->validity, BREAKPOINT_DEFAULT) && breakpoint_applies(i, INT_MAX)) {
- breakpoints |= 1 << i->type;
+ breakpoints |= UINT32_C(1) << i->type;
found_default = true;
break;
}
}
if (breakpoint_applies(&breakpoint_info_table[tt], LOG_WARNING))
- breakpoints |= 1 << tt;
+ breakpoints |= UINT32_C(1) << tt;
}
*ret_breakpoints = breakpoints;