Do not put zero-length arrays into the generated dissector; GCC may let
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 20 Jul 2001 09:50:08 +0000 (09:50 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 20 Jul 2001 09:50:08 +0000 (09:50 +0000)
you get away with them, but other compilers, e.g. Microsoft Visual C++,
don't.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3752 f5534014-38df-0310-8fa8-9805f1628bb7

ethereal_gen.py

index 38c4d102a844561f5fac0d52b0f89dcbd2e99ccd..25378f3c448aa1b2222f8b145092af06aa204905 100644 (file)
@@ -1,6 +1,6 @@
 # -*- python -*-
 #
-# $Id: ethereal_gen.py,v 1.6 2001/07/16 20:44:28 oabad Exp $
+# $Id: ethereal_gen.py,v 1.7 2001/07/20 09:50:08 guy Exp $
 #
 #                           
 # ethereal_gen.py (part of idl2eth)           
@@ -1257,11 +1257,13 @@ void proto_register_giop_@dissector_name@(void) {
 
    /* setup list of header fields */
 
+#if 0
    static hf_register_info hf[] = {
 
       /* no fields yet */
       
    };
+#endif
 
    /* setup protocol subtree array */
 
@@ -1273,7 +1275,9 @@ void proto_register_giop_@dissector_name@(void) {
    
    proto_@dissector_name@ = proto_register_protocol(\"@description@\" , \"@protocol_name@\", \"giop-@dissector_name@\" );
 
+#if 0
    proto_register_field_array(proto_@dissector_name@, hf, array_length(hf));
+#endif
    proto_register_subtree_array(ett,array_length(ett));
    
 }