Fix a compiler warning.
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 29 Mar 2005 16:02:02 +0000 (16:02 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 29 Mar 2005 16:02:02 +0000 (16:02 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13969 f5534014-38df-0310-8fa8-9805f1628bb7

epan/proto.c

index b9535573ed3a9c7393d85cb14e733d6e949be49d..d5401af98d291131946306c93db7f8d4e49344ff 100644 (file)
@@ -2128,6 +2128,7 @@ alloc_field_info(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
                                    item_length = length_remaining;
             }
                }
+g_assert(item_length >= 0);
                if (item_length < 0) {
                        REPORT_DISSECTOR_BUG(g_strdup_printf("\"%s\" - \"%s\" invalid length: %d (%s:%u)",
                            hfinfo->name, hfinfo->abbrev, item_length,
@@ -2364,7 +2365,8 @@ proto_register_protocol(char *name, char *short_name, char *filter_name)
     header_field_info *hfinfo;
     int proto_id;
     char *existing_name;
-    gint *key, i;
+    gint *key;
+    guint i;
     gboolean found_invalid;
 
     /*