Ethereal

[Ethereal-dev] Syntax error in packet-diameter.c on Win2k
Google
 
Web Ethereal.com

Home | Introduction | Documentation | Lists | FAQ | Development | Wiki | Bugs

Ethereal-dev: August 2001


While compiling packet-diameter.c on a Win2k box 
I got the following syntax error:

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        cd ..                                                  
        cl -DWIN32 -DNULL=0 -D_MT -D_DLL /nologo -DHAVE_CONFIG_H -Zi /IC:\PROGRA
~1\GIMP\src\glib /IC:\PROGRA~1\GIMP\src\glib\gmodule  /IC:\PROGRA~1\GIMP\src\gtk
+ /Iepan /Iwiretap /IC:\PROGRA~1\GIMP\src\gtk+\gdk /IC:\PROGRA~1\GIMP\src\gtk+\g
dk\win32  /IC:\WPdpack/include /c packet-diameter.c                             
packet-diameter.c                                                               
packet-diameter.c(752) : error C2632: 'long' followed by 'long' is illegal      
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.            

It seems the compiler doesn't like the (unsigned long long) type cast
in the following code segment:

      case DIAMETER_INTEGER64:
        {
          gint64 data;
          memcpy(&data, dataBuffer, 8);
          /* data = ntohll(data); */
          proto_tree_add_int_format(avpi_tree, hf_diameter_avp_data_int64,
                  tvb, offset, avpDataLength, data,
                 "Value: 0x%016llx (%lld)", (unsigned long long)data, data );
        }
        break;

I believe I have the latest version (1.25) of the file.

The obvious work-around is to remove the second "long".

-- 
Steve Dickson                                                                   
Talarian, Corp.               Website: www.talarian.com
Vmail: 603/579-5424           Cell   : 603/765-0722



Powered by MHonArc 2.6.10