提交 d0ab79e9 编写于 作者: J Ján Tomko

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;
                                    ^
上级 95da1913
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册