Ethereal-dev: Re: [Ethereal-dev] ethereal0.9.5: capture.c makes HP ANSI Compiler barf

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Tue, 20 Aug 2002 08:11:22 -0500 (CDT)
On Tue, 20 Aug 2002, Jost Martin wrote:

> Hello,
> 
> right now, capture.c from ethereal0.9.5 awfully upsets HPs ANSI-C-Compiler on HPUX 10.20

It looks like Guy fixed this about a week ago:

http://www.ethereal.com/cgi-bin/viewcvs.cgi/ethereal/capture.c.diff?r1=1.187&r2=1.188

The changes will be in version 0.9.6, which should be released in about 12
hours.


> (
> delphi:/pd-sw/sysadm/ethereal/ethereal-0.9.5> what `which cc`
> /opt/ansic/bin/cc:
>               LINT A.10.32.30 CXREF  A.10.32.30
>         HP92453-01 A.10.32.30 HP C Compiler
>          /usr/lib/libc: $Revision: 76.3 $
> )
> 
> This is what happens:
> 
> cc -DHAVE_CONFIG_H -I. -I. -I.   -I/pd/libs/include/ -I. -I./wiretap -I/usr/local/include  -Ae +O2 -D_U_="" +DAportable -Ae +O2 -I. -I./wiretap -I/usr/local/include -I/pd/libs/include/gtk-1.2 -I/pd/libs/include/glib-1.2 -I/pd/libs/lib/glib/include -c capture.c
> cc: "/pd/libs/include/glib.h", line 2077: warning 617: Redeclaration of tag "tm" ignored.
> cc: "capture.c", line 179: warning 562: Redeclaration of "sync_pipe" with a different storage class specifier: "sync_pipe" will have internal linkage.
> cc: "capture.c", line 1332: error 1000: Unexpected symbol: "}".
> cc: "capture.c", line 1344: error 1000: Unexpected symbol: "static".
> cc: "capture.c", line 1348: error 1000: Unexpected symbol: "int".
> cc: "capture.c", line 1350: error 1000: Unexpected symbol: "{".
> cc: "capture.c", line 1366: warning 518: Redeclaration of "errmsg" hides formal parameter.
> cc: "capture.c", line 1375: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1375: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1375: error 1555: Address operator requires an lvalue.
> cc: "capture.c", line 1375: error 1521: Incorrect initialization.
> cc: "capture.c", line 1376: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1376: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1376: error 1555: Address operator requires an lvalue.
> cc: "capture.c", line 1376: error 1521: Incorrect initialization.
> cc: "capture.c", line 1377: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1377: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1377: error 1555: Address operator requires an lvalue.
> cc: "capture.c", line 1377: error 1521: Incorrect initialization.
> cc: "capture.c", line 1378: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1378: error 1529: Cannot select field of non-structure.
> cc: "capture.c", line 1378: error 1555: Address operator requires an lvalue.
> cc: "capture.c", line 1378: error 1521: Incorrect initialization.
> [...]
> 
> The reason seems to be an empty 'case' befor the '}'.
> With the following change ("break;" added), it compiles smoothely:
> 
> *** capture.c.~1~       Sun Jun 23 16:40:52 2002
> --- capture.c   Tue Aug 20 13:00:22 2002
> ***************
> *** 1326,1334 ****
>     case PD_PIPE_ERR:
>       snprintf(errmsg, errmsgl, "Error reading from pipe: %s",
>         strerror(errno));
>     case PD_ERR:
>       /* Fall out */
> ! 
>     }
>   
>     ld->pipe_err = PIPERR;
> --- 1326,1335 ----
>     case PD_PIPE_ERR:
>       snprintf(errmsg, errmsgl, "Error reading from pipe: %s",
>         strerror(errno));
> + 
>     case PD_ERR:
>       /* Fall out */
> !     break;
>     }
>   
>     ld->pipe_err = PIPERR;
> 
> It would be nice, if a solution for this problem would be integrated in the distribution.
> 
> Thanks !
> 
> Martin Jost
> 
> P.S.:
> Please contact me, if you need further details !
> 
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>