diff options
author | Ján Tomko <jtomko@redhat.com> | 2015-01-27 13:36:10 +0100 |
---|---|---|
committer | Ján Tomko <jtomko@redhat.com> | 2015-01-27 13:43:23 +0100 |
commit | d0ab79e9cdb930d99dcb2d9b017262d5efbfb0e0 (patch) | |
tree | db98b7b298e2c4dca7c8944cb3368c2020f9d1df /daemon | |
parent | 95da191376c4893ad3da1a7b37594f679fab9e03 (diff) | |
download | libvirt-d0ab79e9cdb930d99dcb2d9b017262d5efbfb0e0.tar.gz |
Fix shadowed variable warning
libvirtd.c: In function 'daemonSetupAccessManager':
libvirtd.c:730:18: error: declaration of 'driver' shadows
a global declaration [-Werror=shadow]
const char **driver = (const char **)config->access_drivers;
^
In file included from libvirtd.c:95:0:
../src/node_device/node_device_driver.h:43:36: error: shadowed
declaration is here [-Werror=shadow]
extern virNodeDeviceDriverStatePtr driver;
^
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/libvirtd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 5ccfcdd154..86accaa3bc 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -727,13 +727,13 @@ daemonSetupAccessManager(struct daemonConfig *config) { virAccessManagerPtr mgr; const char *none[] = { "none", NULL }; - const char **driver = (const char **)config->access_drivers; + const char **drv = (const char **)config->access_drivers; - if (!driver || - !driver[0]) - driver = none; + if (!drv || + !drv[0]) + drv = none; - if (!(mgr = virAccessManagerNewStack(driver))) + if (!(mgr = virAccessManagerNewStack(drv))) return -1; virAccessManagerSetDefault(mgr); |