The BreakpointType enum includes _BREAKPOINT_TYPE_INVALID (-EINVAL),
so Coverity flags the bit shift as potentially using a negative shift
amount. Add an assert to verify the type is in valid range, since the
static table only contains valid entries.
CID#
1568482
Follow-up for
1929226e7e649b72f3f9acd464eaac771c00945c
FOREACH_ELEMENT(i, breakpoint_info_table)
if (FLAGS_SET(i->validity, BREAKPOINT_DEFAULT) && breakpoint_applies(i, INT_MAX)) {
+ assert(i->type >= 0 && i->type < _BREAKPOINT_TYPE_MAX); /* silence coverity */
breakpoints |= UINT32_C(1) << i->type;
found_default = true;
break;