For fun and excitement :) I tried compiling the 10.09 bits on an IA64 HP-UX 11.23 system. I'm not _entirely_ certain of the lineage of the compiler I'm using, having gotten it from an internal depot, but it did emit some warnings that may or may not be meaningful:

the first batch look mostly like someone using a shorthand of "-1" to try to set something to all ones:

        cc -O -I.  -I/usr/local/include -DHAVE_CONFIG_H  -D_U_="__attribute__((u
nused))" -c ./gencode.c
"./gencode.c", line 777: warning #2068-D: integer conversion resulted in a change of sign
        off_vpi = -1;
                  ^

"./gencode.c", line 778: warning #2068-D: integer conversion resulted in a change of sign
        off_vci = -1;
                  ^

"./gencode.c", line 779: warning #2068-D: integer conversion resulted in a change of sign
        off_proto = -1;
                    ^

"./gencode.c", line 780: warning #2068-D: integer conversion resulted in a change of sign
        off_payload = -1;
                      ^

"./gencode.c", line 785: warning #2068-D: integer conversion resulted in a change of sign
        off_sio = -1;
                  ^

"./gencode.c", line 786: warning #2068-D: integer conversion resulted in a change of sign
        off_opc = -1;
                  ^

"./gencode.c", line 787: warning #2068-D: integer conversion resulted in a change of sign
        off_dpc = -1;
                  ^

"./gencode.c", line 788: warning #2068-D: integer conversion resulted in a change of sign
        off_sls = -1;
                  ^

"./gencode.c", line 795: warning #2068-D: integer conversion resulted in a change of sign
        orig_linktype = -1;
                        ^

"./gencode.c", line 796: warning #2068-D: integer conversion resulted in a change of sign
        orig_nl = -1;
                  ^

"./gencode.c", line 826: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 833: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1028: warning #2068-D: integer conversion resulted in a change of sign
                off_mac = -1;   /* LLC-encapsulated, so no MAC-layer header */
                          ^

"./gencode.c", line 1036: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1053: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1079: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1094: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1095: warning #2068-D: integer conversion resulted in a change of sign
                off_nl = -1;
                         ^

"./gencode.c", line 1096: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;
                                ^

"./gencode.c", line 1103: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1104: warning #2068-D: integer conversion resulted in a change of sign
                off_nl = -1;
                         ^

"./gencode.c", line 1105: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;
                                ^

"./gencode.c", line 1129: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;     /* no 802.2 LLC */
                                ^

"./gencode.c", line 1156: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;      /* no 802.2 LLC */
                                ^

"./gencode.c", line 1162: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;      /* no 802.2 LLC */
                                ^

"./gencode.c", line 1167: warning #2068-D: integer conversion resulted in a change of sign
                off_nl = -1;            /* not really a network layer but raw IP
 adresses */
                         ^

"./gencode.c", line 1168: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;     /* no 802.2 LLC */
                                ^

"./gencode.c", line 1174: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;     /* no 802.2 LLC */
                                ^

"./gencode.c", line 1179: warning #2068-D: integer conversion resulted in a change of sign
                off_nl = -1;            /* L3 proto location dep. on cookie type
 */
                         ^

"./gencode.c", line 1180: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;     /* no 802.2 LLC */
                                ^

"./gencode.c", line 1188: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1189: warning #2068-D: integer conversion resulted in a change of sign
                off_nl = -1;
                         ^

"./gencode.c", line 1190: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;
                                ^

"./gencode.c", line 1205: warning #2068-D: integer conversion resulted in a change of sign
                off_linktype = -1;
                               ^

"./gencode.c", line 1206: warning #2068-D: integer conversion resulted in a change of sign
                off_nl = -1;
                         ^

"./gencode.c", line 1207: warning #2068-D: integer conversion resulted in a change of sign
                off_nl_nosnap = -1;
                                ^

Then we have some that look similar, involving -2:

"./gencode.c", line 3086: warning #2068-D: integer conversion resulted in a change of sign
                  b0 = gen_mcmp(OR_NET, -2, BPF_B, 0x01, 0x01);
                                        ^

"./gencode.c", line 3094: warning #2068-D: integer conversion resulted in a change of sign
                  b0 = gen_mcmp(OR_NET, -2, BPF_B, 0x01, 0x01);
                                        ^

And then a missing return statement:

"./gencode.c", line 3103: warning #2940-D: missing return statement at end of non-void function "gen_mpls_linktype"
  }
  ^

Then we have another signed versus unsigned sort of thing:

cc -O -I. -I/usr/local/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c bpf_filter.c "bpf_filter.c", line 556: warning #2186-D: pointless comparison of unsigned integer with zero
                    (p->k >= BPF_MEMWORDS || p->k < 0))
                                                  ^


switching-over to tcpdump bits:

more sign stuff:

        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-802_11.c
"./print-802_11.c", line 208: warning #2111-D: statement is unreachable
        return 1;
        ^

"./print-802_11.c", line 1078: warning #2068-D: integer conversion resulted in a
 change of sign
             IS_EXTENDED(last_presentp) &&
             ^

"./print-802_11.c", line 1083: warning #2068-D: integer conversion resulted in a
 change of sign
        if (IS_EXTENDED(last_presentp)) {
            ^

a warning about a shift count:

        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-atm.c
"./print-atm.c", line 299: warning #2063-D: shift count is too large
      vpi = (cell_header>>20)&0xff;
                          ^

which makes sense since cell_header is only 16 bits in size... :) Of course, it also looks a bit odd with the EXTRACT:

int
oam_print (const u_char *p, u_int length, u_int hec) {

    u_int16_t cell_header, cell_type, func_type,vpi,vci,payload,clp;

    cell_header = EXTRACT_32BITS(p);
    cell_type = ((*(p+4+hec))>>4) & 0x0f;
    func_type = *(p+4+hec) & 0x0f;

    vpi = (cell_header>>20)&0xff;
    vci = (cell_header>>4)&0xffff;

with cell_header being given the result of EXTRACT_32BITS... is cell header really supposed to be a 32 bit quantity?

there is a warning about an unused function:

"./print-dccp.c", line 179: warning #2177-D: function "dccp_packet_hdr_len" was
declared but never referenced
  static inline unsigned int dccp_packet_hdr_len(const u_int8_t type)

in that same vein:

        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-isakmp.c
"./print-isakmp.c", line 425: warning #2550-D: variable "q" was set but never us
ed
        const u_int32_t *q;
                         ^

"./print-isakmp.c", line 1353: warning #2550-D: variable "nparen" was set but ne
ver used
                int nparen;
                    ^

"./print-isakmp.c", line 1395: warning #2550-D: variable "ep" was set but never
used
        const u_char *ep;
                      ^

        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-isoclns.c
"./print-isoclns.c", line 611: warning #2550-D: variable "header" was set but ne
ver used
        const struct isis_common_header *header;
                                         ^
        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-pgm.c
"./print-pgm.c", line 165: warning #2550-D: variable "flags1" was set but never
used
        u_int8_t opt_type, opt_len, flags1, flags2;
                                    ^

"./print-pgm.c", line 165: warning #2550-D: variable "flags2" was set but never
used
        u_int8_t opt_type, opt_len, flags1, flags2;
                                            ^

        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-pim.c
"./print-pim.c", line 117: warning #2550-D: variable "maddrlen" was set but neve
r used
        int maddrlen, addrlen, ngroups, njoin, nprune;
            ^

"./print-pim.c", line 117: warning #2550-D: variable "addrlen" was set but never
 used
        int maddrlen, addrlen, ngroups, njoin, nprune;
                      ^

        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-sctp.c
"./print-sctp.c", line 298: warning #2550-D: variable "hb" was set but never use
d
            const struct sctpHBsender *hb;
                                       ^

        cc -O -DHAVE_CONFIG_H  -I./missing  -D_U_="__attribute__((unused))" -I.
-I./../libpcap-2005.10.09  -I/usr/local/include -I./missing -c ./print-icmp6.c
"./print-icmp6.c", line 599: warning #2550-D: variable "opl" was set but never u
sed
        const struct nd_opt_hdr *opl;   /* why there's no struct? */
                                 ^

"./print-icmp6.c", line 601: warning #2550-D: variable "opr" was set but never u
sed
        const struct icmp6_opts_redirect *opr;
                                          ^

-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.

Reply via email to