Ethereal-dev: Re: [Ethereal-dev] Error building 0.10.12 on HP-UX 10.20

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

Date: Thu, 4 Aug 2005 16:23:17 -0500
On Thu, Aug 04, 2005 at 02:50:36PM -0500, Albert Chin wrote:
> While building 0.10.12 on HP-UX 10.20 with the HP C compiler:
>  cc +DAportable -DHAVE_CONFIG_H -I. -I. -I../.. -I./../.. -I./..
> -I/opt/TWWfsw/zlib11/include -I/opt/TWWfsw/libpcap08/include
> -I/opt/TWWfsw/zlib11/include -I/opt/TWWfsw/libpcre50/include -D_U_=
> +O2 -Ae -z -Wp,-H32768 +ESlit +Onofltacc +Oentrysched +Odataprefetch
> +Onolimit -I/opt/TWWfsw/libglib26/include
> -I/opt/TWWfsw/libglib26/lib/include -I/opt/TWWfsw/libgtk+26/include
> -I/opt/TWWfsw/libgtk+26/lib/include -I/opt/TWWfsw/libpango18/include
> -I/opt/TWWfsw/libatk19/include -I/opt/TWWfsw/fcpackage22/include
> -I/opt/TWWfsw/libttf21/include/freetype2
> -I/opt/TWWfsw/gettext014/include -I/opt/TWWfsw/zlib11/include
> -I/opt/TWWfsw/libiconv19/include -I/opt/TWWfsw/libpcap08/include
> -I/opt/TWWfsw/libpcre50/include -c packet-h248.c  +Z -DPIC -o
> .libs/packet-h248.o
> cpp: "param.h", line 426: warning 2001: Redefinition of macro MIN.
> cpp: "param.h", line 427: warning 2001: Redefinition of macro MAX.
> cc: "/opt/TWWfsw/libglib26/include/glib/gdate.h", line 48: warning 617: Redeclaration of tag "tm" ignored.
> cc: "packet-h248.c", line 771: error 1654: Expression type is too large for switch expression.
> gmake[4]: *** [packet-h248.lo] Error 1
> 
> Is the expression in a switch statement suppose to be an int or
> unsigned int? In this case, context_id is guint64.

How about the attached patch?

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)
--- epan/dissectors/packet-h248.c.orig	2005-08-04 16:02:33.063701000 -0500
+++ epan/dissectors/packet-h248.c	2005-08-04 16:03:06.442103000 -0500
@@ -747,7 +747,7 @@
 	gboolean pc;
 	gint32 tag;
 	guint32 len;
-	guint64 context_id = 0;
+	guint32 context_id = 0;
 	guint32 i;
 	static gchar context_string[64];
 	static gchar context_string_long[64];