Error: CPPCHECK_WARNING (CWE-758): [#def1] ethtool-6.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/ethtool.c:5320: error[uninitvar]: Uninitialized variable: cont.count # 5318| return 87; # 5319| } # 5320|-> if (cont.count) # 5321| fprintf(stdout, "Downshift count: %d\n", cont.count); # 5322| else Error: CPPCHECK_WARNING (CWE-457): [#def6] ethtool-6.11-build/ethtool-6.11/ethtool.c:5339: error[uninitvar]: Uninitialized variable: cont.msecs # 5337| } # 5338| # 5339|-> if (cont.msecs == ETHTOOL_PHY_FAST_LINK_DOWN_ON) # 5340| fprintf(stdout, "Fast Link Down enabled\n"); # 5341| else if (cont.msecs == ETHTOOL_PHY_FAST_LINK_DOWN_OFF) Error: CPPCHECK_WARNING (CWE-457): [#def7] ethtool-6.11-build/ethtool-6.11/ethtool.c:5361: error[uninitvar]: Uninitialized variable: cont.msecs # 5359| } # 5360| # 5361|-> if (cont.msecs == ETHTOOL_PHY_EDPD_DISABLE) # 5362| fprintf(stdout, "Energy Detect Power Down: disabled\n"); # 5363| else if (cont.msecs == ETHTOOL_PHY_EDPD_NO_TX) Error: GCC_ANALYZER_WARNING (CWE-835): [#def8] ethtool-6.11-build/ethtool-6.11/igb.c: scope_hint: In function ‘igb_dump_regs’ ethtool-6.11-build/ethtool-6.11/igb.c:831:23: warning[-Wanalyzer-infinite-loop]: infinite loop # 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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/netlink/cable_test.c:130: error[uninitvar]: Uninitialized variables: pos.nla_len, pos.nla_type # 128| # 129| mnl_attr_for_each_nested(pos, nest) { # 130|-> ret = nl_cable_test_ntf_attr(pos); # 131| if (ret < 0) # 132| return; Error: CPPCHECK_WARNING (CWE-457): [#def17] ethtool-6.11-build/ethtool-6.11/netlink/cable_test.c:398: error[uninitvar]: Uninitialized variables: pos.nla_len, pos.nla_type # 396| # 397| mnl_attr_for_each_nested(pos, nest) { # 398|-> ret = nl_cable_test_tdr_ntf_attr(pos); # 399| if (ret < 0) # 400| return; Error: CPPCHECK_WARNING (CWE-401): [#def18] ethtool-6.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.11-build/ethtool-6.11/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.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
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-180.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | ethtool-6.11-1.fc42 |
store-results-to | /tmp/tmp0w3pso_2/ethtool-6.11-1.fc42.tar.xz |
time-created | 2024-11-12 23:47:50 |
time-finished | 2024-11-12 23:49:15 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp0w3pso_2/ethtool-6.11-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp0w3pso_2/ethtool-6.11-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |