Coverity-updates archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
New Defects reported by Coverity Scan for NetBSD-i386-kernel
Hi,
Please find the latest report on new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.
1 new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 1245802: Missing parentheses (CONSTANT_EXPRESSION_RESULT)
/sys/dev/pci/if_alc.c: 472 in alc_dsp_fixup()
________________________________________________________________________________________________________
*** CID 1245802: Missing parentheses (CONSTANT_EXPRESSION_RESULT)
/sys/dev/pci/if_alc.c: 472 in alc_dsp_fixup()
466 */
467 if ((sc->alc_flags & ALC_FLAG_LINK) != 0) {
468 len = alc_miiext_readreg(sc, MII_EXT_PCS, MII_EXT_CLDCTL6);
469 len = (len >> EXT_CLDCTL6_CAB_LEN_SHIFT) &
470 EXT_CLDCTL6_CAB_LEN_MASK;
471 agc = alc_miidbg_readreg(sc, MII_DBG_AGC);
>>> CID 1245802: Missing parentheses (CONSTANT_EXPRESSION_RESULT)
>>> "(agc >> 8) & 0x3f00" is always 0 regardless of the values of its operands. This occurs as the operand of assignment. Did you intend to apply '&' to "8" and "16128"? If so, parentheses would be required to force this interpretation.
472 agc = (agc >> DBG_AGC_2_VGA_SHIFT) & DBG_AGC_2_VGA_MASK;
473 if ((media == IFM_1000_T && len > EXT_CLDCTL6_CAB_LEN_SHORT1G &&
474 agc > DBG_AGC_LONG1G_LIMT) ||
475 (media == IFM_100_TX && len > DBG_AGC_LONG100M_LIMT &&
476 agc > DBG_AGC_LONG1G_LIMT)) {
477 alc_miidbg_writereg(sc, MII_DBG_AZ_ANADECT,
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/1450?tab=overview
To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click http://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782 .
Home |
Main Index |
Thread Index |
Old Index