Ignore:
Timestamp:
02/21/14 10:38:06 (8 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
a31777e
Parents:
86bec15
Message:

Fixed warnings that cropped up when building with clang

  • Added proper "unknown" or "error" values to some libtrace enums. This removes the need for the hideous ==~0U checks that we used to do to check for errors and should be a bit more robust.
  • Fixed potential strncat bugs in one of the libpacketdump decoders.
  • Changed some null-ops in ior-peek as our current method was triggering warnings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcapfile.c

    raccdd5b rf7bcbfb  
    426426        /* Silently discard RT metadata packets and packets with an
    427427         * unknown linktype. */
    428         if (linktype == TRACE_TYPE_NONDATA || linktype == ~0U) {
     428        if (linktype == TRACE_TYPE_NONDATA || linktype == TRACE_TYPE_UNKNOWN) {
    429429                return 0;
    430430        }
     
    433433         * pop off the top header until it can be converted
    434434         */
    435         while (libtrace_to_pcap_linktype(linktype)==~0U) {
     435        while (libtrace_to_pcap_linktype(linktype)==TRACE_DLT_ERROR) {
    436436                if (!demote_packet(packet)) {
    437437                        trace_set_err_out(out,
Note: See TracChangeset for help on using the changeset viewer.