Error: CPPCHECK_WARNING (CWE-758): [#def1] ethtool-6.14/amd8111e.c:78: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 76| typedef enum { # 77| # 78|-> INTR = (1 << 31), # 79| PCSINT = (1 << 28), # 80| LCINT = (1 << 27), Error: CPPCHECK_WARNING (CWE-758): [#def2] ethtool-6.14/de2104x.c:528: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 526| , # 527| v, # 528|-> v & (1<<31) ? " Special capture effect enabled\n" : "", # 529| v & (1<<17) ? " Capture effect enabled\n" : "", # 530| csr6_tx_thresh[(v >> 14) & 3], Error: CPPCHECK_WARNING (CWE-758): [#def3] ethtool-6.14/ethtool.c:1056: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 1054| break; # 1055| case 'r': # 1056|-> *data |= RXH_DISCARD; # 1057| break; # 1058| default: Error: CPPCHECK_WARNING (CWE-758): [#def4] ethtool-6.14/ethtool.c:1665: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 1663| } # 1664| # 1665|-> if (val & RXH_DISCARD) { # 1666| fprintf(stdout, " - All matching flows discarded on RX\n"); # 1667| return 0; Error: CPPCHECK_WARNING (CWE-457): [#def5] ethtool-6.14/ethtool.c:5335: error[uninitvar]: Uninitialized variable: cont.count # 5333| return 87; # 5334| } # 5335|-> if (cont.count) # 5336| fprintf(stdout, "Downshift count: %d\n", cont.count); # 5337| else Error: CPPCHECK_WARNING (CWE-457): [#def6] ethtool-6.14/ethtool.c:5354: error[uninitvar]: Uninitialized variable: cont.msecs # 5352| } # 5353| # 5354|-> if (cont.msecs == ETHTOOL_PHY_FAST_LINK_DOWN_ON) # 5355| fprintf(stdout, "Fast Link Down enabled\n"); # 5356| else if (cont.msecs == ETHTOOL_PHY_FAST_LINK_DOWN_OFF) Error: CPPCHECK_WARNING (CWE-457): [#def7] ethtool-6.14/ethtool.c:5376: error[uninitvar]: Uninitialized variable: cont.msecs # 5374| } # 5375| # 5376|-> if (cont.msecs == ETHTOOL_PHY_EDPD_DISABLE) # 5377| fprintf(stdout, "Energy Detect Power Down: disabled\n"); # 5378| else if (cont.msecs == ETHTOOL_PHY_EDPD_NO_TX) Error: GCC_ANALYZER_WARNING (CWE-835): [#def8] ethtool-6.14/igb.c:831:21: warning[-Wanalyzer-infinite-loop]: infinite loop ethtool-6.14/igb.c:831:21: danger: infinite loop here ethtool-6.14/igb.c:831:21: branch_true: if it ever follows ‘true’ branch, it will always do so... ethtool-6.14/igb.c:834:54: branch_true: ...to here # 829| 0x05A00 + (0x4 * i), i, i, regs_buff[255 + i]); # 830| # 831|-> for (i = 0; i < 128; i++) # 832| fprintf(stdout, # 833| "0x0%02X: FFMT%03d (Flexible filter mask table%03d) 0x%08X\n", Error: CPPCHECK_WARNING (CWE-758): [#def9] ethtool-6.14/natsemi.c:384: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 382| data[REG_CFG] & BIT_CFG_FDUP ? "Full" : "Half", # 383| data[REG_CFG] & BIT_CFG_SPEED100 ? 100 : 10, # 384|-> data[REG_CFG] & BIT_CFG_LNKSTS ? "Up" : "Down"); # 385| # 386| /* EEPROM access register */ Error: CPPCHECK_WARNING (CWE-758): [#def10] ethtool-6.14/natsemi.c:456: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 454| data[REG_TXCFG] & BIT_TXCFG_MLB ? "Enabled" : "Disabled", # 455| data[REG_TXCFG] & BIT_TXCFG_HBI ? "Enabled" : "Disabled", # 456|-> data[REG_TXCFG] & BIT_TXCFG_CSI ? "Enabled" : "Disabled"); # 457| # 458| Error: CPPCHECK_WARNING (CWE-758): [#def11] ethtool-6.14/natsemi.c:482: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 480| data[REG_RXCFG] & BIT_RXCFG_ATX ? "Accepted" : "Rejected", # 481| data[REG_RXCFG] & BIT_RXCFG_ARP ? "Accepted" : "Rejected", # 482|-> data[REG_RXCFG] & BIT_RXCFG_AEP ? "Accepted" : "Rejected"); # 483| # 484| /* CLKRUN control/status register */ Error: CPPCHECK_WARNING (CWE-758): [#def12] ethtool-6.14/natsemi.c:542: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 540| if (data[REG_WCSR] & BIT_WCSR_PATM3) fprintf(stdout, # 541| " Pattern 3 Received\n"); # 542|-> if (data[REG_WCSR] & BIT_WCSR_MPR) fprintf(stdout, # 543| " Magic Packet Received\n"); # 544| Error: CPPCHECK_WARNING (CWE-758): [#def13] ethtool-6.14/natsemi.c:559: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 557| data[REG_PCR] & BIT_PCR_PS_DA ? "Enabled" : "Disabled", # 558| data[REG_PCR] & BIT_PCR_PSMCAST ? "Enabled" : "Disabled", # 559|-> data[REG_PCR] & BIT_PCR_PSEN ? "Enabled" : "Disabled"); # 560| if (data[REG_PCR] & BIT_PCR_PS_RCVD) fprintf(stdout, # 561| " PS_RCVD: Pause Frame Received\n"); Error: CPPCHECK_WARNING (CWE-758): [#def14] ethtool-6.14/natsemi.c:591: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 589| data[REG_RFCR] & BIT_RFCR_AAM ? "Accepted" : "Rejected", # 590| data[REG_RFCR] & BIT_RFCR_AAB ? "Accepted" : "Rejected", # 591|-> data[REG_RFCR] & BIT_RFCR_RFEN ? "Enabled" : "Disabled"); # 592| # 593| /* Rx filter data register */ Error: CPPCHECK_WARNING (CWE-758): [#def15] ethtool-6.14/natsemi.c:615: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 613| "0x50: BRAR (Boot ROM Address): 0x%08x\n", # 614| data[REG_BRAR]); # 615|-> if (data[REG_BRAR] & BIT_BRAR_AUTOINC) fprintf(stdout, # 616| " Automatically Increment Address\n"); # 617| Error: CPPCHECK_WARNING (CWE-457): [#def16] ethtool-6.14/netlink/cable_test.c:156: error[uninitvar]: Uninitialized variables: pos.nla_len, pos.nla_type # 154| # 155| mnl_attr_for_each_nested(pos, nest) { # 156|-> ret = nl_cable_test_ntf_attr(pos); # 157| if (ret < 0) # 158| return; Error: CPPCHECK_WARNING (CWE-457): [#def17] ethtool-6.14/netlink/cable_test.c:424: error[uninitvar]: Uninitialized variables: pos.nla_len, pos.nla_type # 422| # 423| mnl_attr_for_each_nested(pos, nest) { # 424|-> ret = nl_cable_test_tdr_ntf_attr(pos); # 425| if (ret < 0) # 426| return; Error: CPPCHECK_WARNING (CWE-401): [#def18] ethtool-6.14/netlink/module-eeprom.c:107: error[memleak]: Memory leak: entry # 105| list_add(&entry->list, &eeprom_page_list); # 106| # 107|-> return 0; # 108| } # 109| Error: CPPCHECK_WARNING (CWE-401): [#def19] ethtool-6.14/netlink/msgbuff.c:63: error[memleak]: Memory leak: nbuff # 61| msgbuff->left += (new_size - old_size); # 62| # 63|-> return 0; # 64| } # 65| Error: CPPCHECK_WARNING (CWE-457): [#def20] ethtool-6.14/netlink/prettymsg.c:92: error[uninitvar]: Uninitialized variables: child.nla_len, child.nla_type # 90| unsigned int child_off; # 91| # 92|-> child_off = (const char *)child - (const char *)attr; # 93| ret = pretty_print_attr(child, # 94| adesc ? adesc->children : NULL, Error: CPPCHECK_WARNING (CWE-457): [#def21] ethtool-6.14/netlink/prettymsg.c:191: error[uninitvar]: Uninitialized variables: attr.nla_len, attr.nla_type # 189| # 190| mnl_attr_for_each(attr, nlhdr, payload_offset) { # 191|-> attr_offset = (const char *)attr - (const char *)nlhdr; # 192| ret = pretty_print_attr(attr, desc, ndesc, 1, # 193| err_offset - attr_offset, false);
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-208.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | ethtool-6.14-2.fc43 |
store-results-to | /tmp/tmpgrto8hmm/ethtool-6.14-2.fc43.tar.xz |
time-created | 2025-04-25 12:25:41 |
time-finished | 2025-04-25 12:27:03 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpgrto8hmm/ethtool-6.14-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgrto8hmm/ethtool-6.14-2.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |