aboutsummaryrefslogtreecommitdiffstats
path: root/ui/io_graph_item.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2017-03-08 23:05:14 +0100
committerMichael Mann <mmann78@netscape.net>2017-03-10 02:48:09 +0000
commit9e0251f2187388ce03b4afde91df2528e313afd8 (patch)
tree3784818ee8e62f9710eeaabb4899cb50d51b9464 /ui/io_graph_item.c
parent3a63f8dc61b103c4716e49a914868a2ca327f4de (diff)
io_graph_item: fix false positive array subscript is above array bounds [-Werror=array-bounds]
Change-Id: I14fc19f131782a9c85104ca2189b9452079d0013 Reviewed-on: https://code.wireshark.org/review/20454 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/io_graph_item.c')
-rw-r--r--ui/io_graph_item.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/io_graph_item.c b/ui/io_graph_item.c
index 9c686d962f..641edfd478 100644
--- a/ui/io_graph_item.c
+++ b/ui/io_graph_item.c
@@ -116,6 +116,7 @@ GString *check_field_unit(const char *field_name, int *hf_index, io_graph_item_u
case IOG_ITEM_UNIT_CALC_LOAD:
break;
default:
+ g_assert(item_unit < NUM_IOG_ITEM_UNITS);
err_str = g_string_new("");
g_string_printf(err_str, "\"%s\" is a relative-time field. %s calculations are not supported on it.",
field_name,