Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Control Flow  at tshark.c:2889

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

print_packet

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tshark.c)expand/collapse
Show more  
 2833  print_packet(capture_file *cf, epan_dissect_t *edt)
 2834  {
 2835    print_args_t  print_args;
 2836   
 2837    if (verbose) {
 2838      /* Print the information in the protocol tree. */
 2839      switch (output_action) {
 2840   
 2841      case WRITE_TEXT:
 2842        print_args.to_file = TRUE;
 2843        print_args.format = print_format;
 2844        print_args.print_summary = !verbose;
 2845        print_args.print_hex = verbose && print_hex;
 2846        print_args.print_formfeed = FALSE;
 2847        print_args.print_dissections = verbose ? print_dissections_expanded : print_dissections_none;
 2848   
 2849        /* init the packet range */
 2850        packet_range_init(&print_args.range);
 2851   
 2852        if (!proto_tree_print(&print_args, edt, print_stream))
 2853          return FALSE;
 2854        if (!print_hex) {
 2855          /* "print_hex_data()" will put out a leading blank line, as well
 2856           as a trailing one; print one here, to separate the packets,
 2857           only if "print_hex_data()" won't be called. */
 2858          if (!print_line(print_stream, 0, ""))
 2859            return FALSE;
 2860        }
 2861        break;
 2862   
 2863      case WRITE_XML:
 2864        proto_tree_write_pdml(edt, stdout);
 2865        printf("\n");
 2866        return !ferror(stdout);
 2867      case WRITE_FIELDS:
 2868        proto_tree_write_fields(output_fields, edt, stdout);
 2869        printf("\n");
 2870        return !ferror(stdout);
 2871      }
 2872    } else {
 2873      /* Just fill in the columns. */
 2874      epan_dissect_fill_in_columns(edt);
 2875   
 2876      /* Now print them. */
 2877      switch (output_action) {
 2878   
 2879      case WRITE_TEXT:
 2880          if (!print_columns(cf))
 2881            return FALSE;
 2882          break;
 2883   
 2884      case WRITE_XML:
 2885          proto_tree_write_psml(edt, stdout);
 2886          return !ferror(stdout);
 2887      case WRITE_FIELDS: /*No non-verbose "fields" format */
 2888          g_assert_not_reached();
 2889          break;
 2890      }
 2891    }
 2892    if (print_hex) {
 2893      if (!print_hex_data(print_stream, edt))
 2894        return FALSE;
 2895      if (!print_line(print_stream, 0, ""))
 2896        return FALSE;
 2897    }
 2898    return TRUE;
 2899  }
Show more  




Change Warning 4884.31276 : Unreachable Control Flow

Priority:
State:
Finding:
Owner:
Note: