]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
staging: comedi: tests: ni_routes_test: Remove unused variable 'olddevroutes'
authorQiheng Lin <linqiheng@huawei.com>
Sat, 10 Apr 2021 06:49:32 +0000 (14:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Apr 2021 08:29:28 +0000 (10:29 +0200)
GCC reports the following warning with W=1:

drivers/staging/comedi/drivers/tests/ni_routes_test.c:215:45: warning:
 variable 'olddevroutes' set but not used [-Wunused-but-set-variable]
  215 |  const struct ni_device_routes *devroutes, *olddevroutes;
      |                                             ^~~~~~~~~~~~

This variable is not used in function , this commit
remove it to fix the warning.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
Link: https://lore.kernel.org/r/20210410064932.12905-1-linqiheng@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/tests/ni_routes_test.c

index 40fe4f180eb9b36433af2c05ca6dceb9652ce91b..32073850d545be396d8bb08afa4f2eb208b6ef66 100644 (file)
@@ -213,7 +213,7 @@ static bool route_set_sources_in_order(const struct ni_device_routes *devroutes)
 
 static void test_ni_assign_device_routes(void)
 {
-       const struct ni_device_routes *devroutes, *olddevroutes;
+       const struct ni_device_routes *devroutes;
        const u8 *table, *oldtable;
 
        init_pci_6070e();
@@ -249,7 +249,6 @@ static void test_ni_assign_device_routes(void)
                 RVI(table, B(NI_AI_ConvertClock), B(NI_PFI(2))) == V(NI_PFI_OUTPUT_AI_CONVERT),
                 "pci-6070e finds e-series route_values table\n");
 
-       olddevroutes = devroutes;
        oldtable = table;
        init_pci_6220();
        ni_assign_device_routes(ni_mseries, pci_6220, NULL,