diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-09-06 16:57:56 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-09-07 01:43:22 +0000 |
commit | 5c388384329775538d618681f571d5f052bc2ae6 (patch) | |
tree | 2cdbb2ffe55f11547a55405b5fafd70a154b3045 /ui/io_graph_item.h | |
parent | facc9535044bf082bf958be47babba4f35b9fa2e (diff) | |
download | wireshark-5c388384329775538d618681f571d5f052bc2ae6.tar.gz |
Place variable declarations where they're used.
Fix
../../ui/io_graph_item.h:251:29: warning: will never be executed [-Wunreachable-code]
guint64 t, pt; /* time in us */
^
Change-Id: I0e861e892c2c03151d9f98e31ac68ce296baa26a
Reviewed-on: https://code.wireshark.org/review/17545
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/io_graph_item.h')
-rw-r--r-- | ui/io_graph_item.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/io_graph_item.h b/ui/io_graph_item.h index d4e51995a8..0b93be1fee 100644 --- a/ui/io_graph_item.h +++ b/ui/io_graph_item.h @@ -248,18 +248,20 @@ update_io_graph_item(io_graph_item_t *items, int idx, packet_info *pinfo, epan_d new_time = (nstime_t *)fvalue_get(&((field_info *)gp->pdata[i])->value); switch (item_unit) { + case IOG_ITEM_UNIT_CALC_LOAD: + { guint64 t, pt; /* time in us */ int j; - case IOG_ITEM_UNIT_CALC_LOAD: /* - * Add the time this call spanned each interval according to its contribution - * to that interval. - */ + * Add the time this call spanned each interval according to its contribution + * to that interval. + */ t = new_time->secs; t = t * 1000000 + new_time->nsecs / 1000; j = idx; /* - * Handle current interval */ + * Handle current interval + */ pt = pinfo->rel_ts.secs * 1000000 + pinfo->rel_ts.nsecs / 1000; pt = pt % (interval * 1000); if (pt > t) { @@ -287,6 +289,7 @@ update_io_graph_item(io_graph_item_t *items, int idx, packet_info *pinfo, epan_d } } break; + } default: if ( (new_time->secs > item->time_max.secs) || ( (new_time->secs == item->time_max.secs) |