Coverity uses several heuristics to identify when one case statement
legitimately falls through into the next, and a comment as the final item in a
case statement is one heuristic (the assumption being that it is a
justification for the fallthrough).
Use this to perform an audit of defects and hide the legitimate fallthroughs.
No functional change. All identified fallthroughs are legitimate.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Coverity-IDs:
1055483,
1055484,
1055486 -
1055488,
1055490 -
1055496,
1055498 -
1055500,
1055501,
1220091
Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
put_page(ram_page);
return X86EMUL_RETRY;
}
+ /* fallthrough */
default:
if ( ram_page )
put_page(ram_page);
case NESTEDHVM_VMEXIT_ERROR:
break;
}
+ /* fallthrough */
case NESTEDHVM_VMEXIT_ERROR:
gdprintk(XENLOG_ERR,
"nestedsvm_check_intercepts() returned NESTEDHVM_VMEXIT_ERROR\n");
vlapic->hw.tdt_msr = 0;
}
vlapic->pt.irq = val & APIC_VECTOR_MASK;
+ /* fallthrough */
case APIC_LVTTHMR: /* LVT Thermal Monitor */
case APIC_LVTPC: /* LVT Performance Counter */
case APIC_LVT0: /* LVT LINT0 Reg */
{
case -EINTR:
rc = -ERESTART;
+ /* fallthrough */
case -ERESTART:
curr->arch.old_guest_table = page;
break;
{
case -EINTR:
rc = -ERESTART;
+ /* fallthrough */
case -ERESTART:
curr->arch.old_guest_table = page;
okay = 0;
port>>3, 2) )
{
default: x.bytes[0] = ~0;
+ /* fallthrough */
case 1: x.bytes[1] = ~0;
+ /* fallthrough */
case 0: break;
}
TOGGLE_MODE();
{
case 'd': /* 'dom0' */
nmi_hwdom_report(_XEN_NMIREASON_pci_serr);
+ /* fallthrough */
case 'i': /* 'ignore' */
/* Would like to print a diagnostic here but can't call printk()
from NMI context -- raise a softirq instead. */
break;
case MMUEXT_NEW_USER_BASEPTR:
rc = -EINVAL;
+ /* fallthrough */
case MMUEXT_TLB_FLUSH_LOCAL:
case MMUEXT_TLB_FLUSH_MULTI:
case MMUEXT_TLB_FLUSH_ALL:
{
case 'T': case 't':
ret <<= 10;
+ /* fallthrough */
case 'G': case 'g':
ret <<= 10;
+ /* fallthrough */
case 'M': case 'm':
ret <<= 10;
+ /* fallthrough */
case 'K': case 'k':
ret <<= 10;
+ /* fallthrough */
case 'B': case 'b':
s1++;
break;
{
case TASKLET_enqueued:
set_bit(_TASKLET_scheduled, tasklet_work);
+ /* fallthrough */
case TASKLET_enqueued|TASKLET_scheduled:
tasklet_work_scheduled = 1;
break;