CommonLibs: remove unused *trx in cfg[_no]_ctr_error_threshold_cmd

Compilation fails when building with -Wall and -Werror:

trx_vty.c: In function ‘cfg_ctr_error_threshold’:
trx_vty.c:469:18: error: unused variable ‘trx’ [-Werror=unused-variable]
  struct trx_ctx *trx = trx_from_vty(vty);
                  ^~~
trx_vty.c: In function ‘cfg_no_ctr_error_threshold’:
trx_vty.c:501:18: error: unused variable ‘trx’ [-Werror=unused-variable]
  struct trx_ctx *trx = trx_from_vty(vty);
                  ^~~

Change-Id: I3d74c3f38aa03608a32b9dee472e49236543c87f
This commit is contained in:
Vadim Yanitskiy 2023-03-13 04:04:14 +07:00 committed by fixeria
parent 1ddd727bb4
commit f476a6755b
1 changed files with 0 additions and 2 deletions

View File

@ -466,7 +466,6 @@ DEFUN_ATTR(cfg_ctr_error_threshold, cfg_ctr_error_threshold_cmd,
int rc;
struct ctr_threshold ctr;
struct trx_ctx *trx = trx_from_vty(vty);
rc = vty_ctr_name_2_id(argv[0]);
if (rc < 0) {
vty_out(vty, "No valid ctr_name found for ctr-error-threshold %s%s",
@ -498,7 +497,6 @@ DEFUN_ATTR(cfg_no_ctr_error_threshold, cfg_no_ctr_error_threshold_cmd,
int rc;
struct ctr_threshold ctr;
struct trx_ctx *trx = trx_from_vty(vty);
rc = vty_ctr_name_2_id(argv[0]);
if (rc < 0) {
vty_out(vty, "No valid ctr_name found for ctr-error-threshold %s%s",