diff options
author | Toomas Soome <tsoome@me.com> | 2022-11-19 00:06:08 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-12-16 10:37:47 +0200 |
commit | bf7adeeaefd6f9806398f446e4b87af240a6770e (patch) | |
tree | 929f551f520d569ece35545778af98b8acd6e8aa | |
parent | 92f549282aaface1e6f92329085e28edcf24054f (diff) | |
download | illumos-joyent-bf7adeeaefd6f9806398f446e4b87af240a6770e.tar.gz |
15199 libdladm: unused label
Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
Reviewed by: Yuri Pankov <yuri@aetern.org>
Reviewed by: Marco van Wieringen <mvw@planets.elm.net>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r-- | usr/src/lib/libdladm/Makefile.com | 1 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/libdlstat.c | 56 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/linkprop.c | 1 |
3 files changed, 27 insertions, 31 deletions
diff --git a/usr/src/lib/libdladm/Makefile.com b/usr/src/lib/libdladm/Makefile.com index d766a381c2..55dee6aa2a 100644 --- a/usr/src/lib/libdladm/Makefile.com +++ b/usr/src/lib/libdladm/Makefile.com @@ -44,7 +44,6 @@ SRCDIR = ../common CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses -CERRWARN += -_gcc=-Wno-unused-label CERRWARN += $(CNOWARN_UNINIT) CPPFLAGS += -I$(SRCDIR) -D_REENTRANT diff --git a/usr/src/lib/libdladm/common/libdlstat.c b/usr/src/lib/libdladm/common/libdlstat.c index 9f7625f9b2..11a36b2173 100644 --- a/usr/src/lib/libdladm/common/libdlstat.c +++ b/usr/src/lib/libdladm/common/libdlstat.c @@ -54,7 +54,7 @@ struct flowlist { uint64_t ifspeed; boolean_t first; boolean_t display; - pktsum_t prevstats; + pktsum_t prevstats; pktsum_t diffstats; }; @@ -175,7 +175,7 @@ dladm_get_single_mac_stat(dladm_handle_t handle, datalink_id_t linkid, { char module[DLPI_LINKNAME_MAX]; uint_t instance; - char link[DLPI_LINKNAME_MAX]; + char link[DLPI_LINKNAME_MAX]; dladm_status_t status; uint32_t flags, media; kstat_t *ksp; @@ -283,8 +283,8 @@ static stat_info_t rx_hwlane_stats_list[] = { {"pollbytes", RL_OFF(rl_pollbytes)}, {"rxsdrops", RL_OFF(rl_sdrops)}, {"chainunder10", RL_OFF(rl_chl10)}, - {"chain10to50", RL_OFF(rl_ch10_50)}, - {"chainover50", RL_OFF(rl_chg50)} + {"chain10to50", RL_OFF(rl_ch10_50)}, + {"chainover50", RL_OFF(rl_chg50)} }; #define RX_HWLANE_STAT_SIZE A_CNT(rx_hwlane_stats_list) @@ -310,8 +310,8 @@ static stat_info_t rx_lane_stats_list[] = { {"rxsdrops", RL_OFF(rl_sdrops)}, {"pollbytes", RL_OFF(rl_pollbytes)}, {"chainunder10", RL_OFF(rl_chl10)}, - {"chain10to50", RL_OFF(rl_ch10_50)}, - {"chainover50", RL_OFF(rl_chg50)} + {"chain10to50", RL_OFF(rl_ch10_50)}, + {"chainover50", RL_OFF(rl_chg50)} }; #define RX_LANE_STAT_SIZE A_CNT(rx_lane_stats_list) @@ -710,7 +710,7 @@ typedef enum { void dladm_sort_index_list(uint_t idlist[], uint_t size) { - int i, j; + int i, j; for (j = 1; j < size; j++) { int key = idlist[j]; @@ -929,8 +929,8 @@ i_dlstat_query_stats(dladm_handle_t handle, const char *modname, { kstat_t *ksp; char statname[MAXLINKNAMELEN]; - int i = 0; - dladm_stat_chain_t *head = NULL, *prev = NULL; + int i = 0; + dladm_stat_chain_t *head = NULL, *prev = NULL; dladm_stat_chain_t *curr; if (dladm_dld_kcp(handle) == NULL) { @@ -939,7 +939,7 @@ i_dlstat_query_stats(dladm_handle_t handle, const char *modname, } for (i = 0; i < idlist_size; i++) { - uint_t index = idlist[i]; + uint_t index = idlist[i]; (void) snprintf(statname, sizeof (statname), "%s%d", prefix, index); @@ -970,7 +970,6 @@ i_dlstat_query_stats(dladm_handle_t handle, const char *modname, prev = curr; } -done: return (head); } @@ -978,7 +977,7 @@ static misc_stat_entry_t * i_dlstat_misc_stats(dladm_handle_t handle, const char *linkname) { kstat_t *ksp; - misc_stat_entry_t *misc_stat_entry = NULL; + misc_stat_entry_t *misc_stat_entry = NULL; if (dladm_dld_kcp(handle) == NULL) return (NULL); @@ -1240,11 +1239,11 @@ void * dlstat_rx_lane_stats(dladm_handle_t dh, datalink_id_t linkid) { dladm_stat_chain_t *head = NULL; - dladm_stat_chain_t *local_stats = NULL; - dladm_stat_chain_t *bcast_stats = NULL; - dladm_stat_chain_t *defunctlane_stats = NULL; - dladm_stat_chain_t *lane_stats = NULL; - char linkname[MAXLINKNAMELEN]; + dladm_stat_chain_t *local_stats = NULL; + dladm_stat_chain_t *bcast_stats = NULL; + dladm_stat_chain_t *defunctlane_stats = NULL; + dladm_stat_chain_t *lane_stats = NULL; + char linkname[MAXLINKNAMELEN]; boolean_t is_legacy_driver; if (dladm_datalink_id2info(dh, linkid, NULL, NULL, NULL, linkname, @@ -1454,10 +1453,10 @@ void * dlstat_tx_lane_stats(dladm_handle_t dh, datalink_id_t linkid) { dladm_stat_chain_t *head = NULL; - dladm_stat_chain_t *bcast_stats = NULL; - dladm_stat_chain_t *defunctlane_stats = NULL; - dladm_stat_chain_t *lane_stats; - char linkname[MAXLINKNAMELEN]; + dladm_stat_chain_t *bcast_stats = NULL; + dladm_stat_chain_t *defunctlane_stats = NULL; + dladm_stat_chain_t *lane_stats; + char linkname[MAXLINKNAMELEN]; boolean_t is_legacy_driver; if (dladm_datalink_id2info(dh, linkid, NULL, NULL, NULL, linkname, @@ -1643,8 +1642,8 @@ i_dlstat_query_fanout_stats(dladm_handle_t dh, datalink_id_t linkid, char linkname[MAXLINKNAMELEN]; dladm_stat_chain_t *curr, *curr_head; dladm_stat_chain_t *head = NULL, *prev = NULL; - uint_t fanout_idlist[MAX_RINGS_PER_GROUP]; - uint_t fanout_idlist_size; + uint_t fanout_idlist[MAX_RINGS_PER_GROUP]; + uint_t fanout_idlist_size; if (dladm_datalink_id2info(dh, linkid, NULL, NULL, NULL, linkname, DLPI_LINKNAME_MAX) != DLADM_STATUS_OK) { @@ -1720,7 +1719,7 @@ dlstat_fanout_stats(dladm_handle_t dh, datalink_id_t linkid) dladm_stat_chain_t *fout_hwlane_stats; dladm_stat_chain_t *fout_swlane_and_local_stats; fanout_stat_entry_t *fout_stats; - char linkname[MAXLINKNAMELEN]; + char linkname[MAXLINKNAMELEN]; if (dladm_datalink_id2info(dh, linkid, NULL, NULL, NULL, linkname, DLPI_LINKNAME_MAX) != DLADM_STATUS_OK) { @@ -1766,9 +1765,9 @@ i_dlstat_rx_ring_match(void *arg1, void *arg2) static void * i_dlstat_rx_ring_stat_entry_diff(void *arg1, void *arg2) { - ring_stat_entry_t *s1 = arg1; - ring_stat_entry_t *s2 = arg2; - ring_stat_entry_t *diff_entry; + ring_stat_entry_t *s1 = arg1; + ring_stat_entry_t *s2 = arg2; + ring_stat_entry_t *diff_entry; diff_entry = malloc(sizeof (ring_stat_entry_t)); if (diff_entry == NULL) @@ -2272,7 +2271,7 @@ dlstat_misc_stats(dladm_handle_t dh, datalink_id_t linkid) { misc_stat_entry_t *misc_stat_entry; dladm_stat_chain_t *head = NULL; - char linkname[MAXLINKNAMELEN]; + char linkname[MAXLINKNAMELEN]; if (dladm_datalink_id2info(dh, linkid, NULL, NULL, NULL, linkname, DLPI_LINKNAME_MAX) != DLADM_STATUS_OK) { @@ -2461,7 +2460,6 @@ i_walk_dlstat_chain(dladm_stat_chain_t *stat_head, dladm_stat_type_t stattype) nvstat_prev = nvstat_curr; } -done: return (nvstat_head); } diff --git a/usr/src/lib/libdladm/common/linkprop.c b/usr/src/lib/libdladm/common/linkprop.c index 5cfa61166b..19c2a22aa6 100644 --- a/usr/src/lib/libdladm/common/linkprop.c +++ b/usr/src/lib/libdladm/common/linkprop.c @@ -3883,7 +3883,6 @@ set_public_prop(dladm_handle_t handle, prop_desc_t *pdp, status = i_dladm_macprop(handle, dip, B_TRUE); -done: free(dip); return (status); } |