forked from osmocom/wireshark
proto_registrar_get_ftype() returns an FT_ value; make its return type
"enum ftenum" to reflect that, and fix the "switch doesn't handle XXX" warnings that provokes. svn path=/trunk/; revision=42579
This commit is contained in:
parent
88ae29c149
commit
f1b11f62f8
|
@ -6119,7 +6119,7 @@ proto_registrar_get_abbrev(const int n)
|
|||
return hfinfo->abbrev;
|
||||
}
|
||||
|
||||
int
|
||||
enum ftenum
|
||||
proto_registrar_get_ftype(const int n)
|
||||
{
|
||||
header_field_info *hfinfo;
|
||||
|
|
|
@ -1685,7 +1685,7 @@ extern header_field_info* proto_registrar_get_byname(const char *field_name);
|
|||
/** Get enum ftenum FT_ of registered header_field number n.
|
||||
@param n item # n (0-indexed)
|
||||
@return the registered item */
|
||||
extern int proto_registrar_get_ftype(const int n);
|
||||
extern enum ftenum proto_registrar_get_ftype(const int n);
|
||||
|
||||
/** Get parent protocol of registered header_field number n.
|
||||
@param n item # n (0-indexed)
|
||||
|
|
|
@ -191,6 +191,13 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
|
|||
val = (guint64)((new_time->secs * NANOSECS_PER_SEC) + new_time->nsecs);
|
||||
it->counter += val;
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* "Can't happen"; see the checks
|
||||
* in register_io_tap().
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -254,6 +261,13 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
|
|||
it->counter=val;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* "Can't happen"; see the checks
|
||||
* in register_io_tap().
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -310,6 +324,13 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
|
|||
if (val>it->counter)
|
||||
it->counter=val;
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* "Can't happen"; see the checks
|
||||
* in register_io_tap().
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -353,6 +374,13 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
|
|||
val = (guint64)((new_time->secs * NANOSECS_PER_SEC) + new_time->nsecs);
|
||||
it->counter += val;
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* "Can't happen"; see the checks
|
||||
* in register_io_tap().
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -437,6 +437,15 @@ tap_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *
|
|||
nstime_add(&it->time_tot, new_time);
|
||||
it->fields++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* "Can't happen"; see the "check that the
|
||||
* type is compatible" check in
|
||||
* filter_callback().
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue