Wireshark-bugs: [Wireshark-bugs] [Bug 12496] New: Coverity CID 1355646: Dead code in packet-btat
Date: Tue, 07 Jun 2016 15:30:50 +0000
Bug ID 12496
Summary Coverity CID 1355646: Dead code in packet-btatt.c
Product Wireshark
Version Git
Hardware All
OS All
Status CONFIRMED
Severity Normal
Priority Low
Component Dissection engine (libwireshark)
Assignee bugzilla-admin@wireshark.org
Reporter jaap.keuter@xs4all.nl
CC michal.labedzki@tieto.com

Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
    equality_cond: Jumping to case 112U.
8875        case 0x70: /* Response Code  */
8876            proto_tree_add_item(tree, hf_btatt_ots_list_response_opcode,
tvb, offset, 1, ENC_NA);
8877            offset += 1;
8878
8879            proto_tree_add_item(tree, hf_btatt_ots_list_result_code, tvb,
offset, 1, ENC_NA);
8880            offset += 1;
8881
    const: When switching on opcode, the value of opcode must be equal to 112.
8882            switch (opcode) {
    CID 1355646 (#8 of 8): Logically dead code (DEADCODE) [select issue]
8883            case 0x01: /* First */
    CID 1355646 (#7 of 8): Logically dead code (DEADCODE) [select issue]
8884            case 0x02: /* Last */
    CID 1355646 (#6 of 8): Logically dead code (DEADCODE) [select issue]
8885            case 0x03: /* Previous */
    CID 1355646 (#5 of 8): Logically dead code (DEADCODE) [select issue]
8886            case 0x04: /* Next */
    CID 1355646 (#4 of 8): Logically dead code (DEADCODE) [select issue]
8887            case 0x05: /* Go To */
    CID 1355646 (#3 of 8): Logically dead code (DEADCODE) [select issue]
8888            case 0x06: /* Order */
    dead_error_condition: The switch value opcode cannot be 8U.
    CID 1355646 (#1 of 8): Logically dead code (DEADCODE)dead_error_line:
Execution cannot reach this statement: case 8U:.
8889            case 0x08: /* Clear Marking */
8890            case 0x70: /* Response Code  */
8891                /* none */
8892                break;
    CID 1355646 (#2 of 8): Logically dead code (DEADCODE) [select issue]
8893            case 0x07: /* Request Number of Object */
8894                proto_tree_add_item(tree,
hf_btatt_ots_list_total_number_of_objects, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8895                offset += 4;
8896            }
8897        }


You are receiving this mail because:
  • You are watching all bug changes.