提交 c1dff918 编写于 作者: M Michal Privoznik

virsysinfo: s/system/sysdef/

A variable can't be named system, obviously. Well, it can if the
compiler is new enough to distinguish a variable named system and a
function call system(). And some older systems, don't have wise
compiler.

  CC     util/libvirt_util_la-virsysinfo.lo
cc1: warnings being treated as errors
../../src/util/virsysinfo.c: In function 'virSysinfoParseSystem':
../../src/util/virsysinfo.c:649: error: declaration of 'system' shadows a global declaration [-Wshadow]
/usr/include/stdlib.h:717: error: shadowed declaration is here [-Wshadow]
make[3]: *** [util/libvirt_util_la-virsysinfo.lo] Error 1
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 c156856a
...@@ -11155,7 +11155,7 @@ virSysinfoBIOSParseXML(xmlNodePtr node, ...@@ -11155,7 +11155,7 @@ virSysinfoBIOSParseXML(xmlNodePtr node,
static int static int
virSysinfoSystemParseXML(xmlNodePtr node, virSysinfoSystemParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt, xmlXPathContextPtr ctxt,
virSysinfoSystemDefPtr *system, virSysinfoSystemDefPtr *sysdef,
unsigned char *domUUID, unsigned char *domUUID,
bool uuid_generated) bool uuid_generated)
{ {
...@@ -11218,7 +11218,7 @@ virSysinfoSystemParseXML(xmlNodePtr node, ...@@ -11218,7 +11218,7 @@ virSysinfoSystemParseXML(xmlNodePtr node,
def = NULL; def = NULL;
} }
*system = def; *sysdef = def;
def = NULL; def = NULL;
ret = 0; ret = 0;
cleanup: cleanup:
......
...@@ -150,7 +150,7 @@ void virSysinfoDefFree(virSysinfoDefPtr def) ...@@ -150,7 +150,7 @@ void virSysinfoDefFree(virSysinfoDefPtr def)
#if defined(__powerpc__) #if defined(__powerpc__)
static int static int
virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *sysdef)
{ {
int ret = -1; int ret = -1;
char *eol = NULL; char *eol = NULL;
...@@ -193,7 +193,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) ...@@ -193,7 +193,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system)
def = NULL; def = NULL;
} }
*system = def; *sysdef = def;
def = NULL; def = NULL;
ret = 0; ret = 0;
cleanup: cleanup:
...@@ -280,7 +280,7 @@ virSysinfoRead(void) ...@@ -280,7 +280,7 @@ virSysinfoRead(void)
#elif defined(__arm__) || defined(__aarch64__) #elif defined(__arm__) || defined(__aarch64__)
static int static int
virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *sysdef)
{ {
int ret = -1; int ret = -1;
char *eol = NULL; char *eol = NULL;
...@@ -323,7 +323,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) ...@@ -323,7 +323,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system)
def = NULL; def = NULL;
} }
*system = def; *sysdef = def;
def = NULL; def = NULL;
ret = 0; ret = 0;
cleanup: cleanup:
...@@ -452,7 +452,7 @@ virSysinfoParseLine(const char *base, const char *name, char **value) ...@@ -452,7 +452,7 @@ virSysinfoParseLine(const char *base, const char *name, char **value)
} }
static int static int
virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *sysdef)
{ {
int ret = -1; int ret = -1;
virSysinfoSystemDefPtr def; virSysinfoSystemDefPtr def;
...@@ -478,7 +478,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) ...@@ -478,7 +478,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system)
def = NULL; def = NULL;
} }
*system = def; *sysdef = def;
def = NULL; def = NULL;
ret = 0; ret = 0;
cleanup: cleanup:
...@@ -646,7 +646,7 @@ virSysinfoParseBIOS(const char *base, virSysinfoBIOSDefPtr *bios) ...@@ -646,7 +646,7 @@ virSysinfoParseBIOS(const char *base, virSysinfoBIOSDefPtr *bios)
} }
static int static int
virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *sysdef)
{ {
int ret = -1; int ret = -1;
const char *cur, *eol = NULL; const char *cur, *eol = NULL;
...@@ -708,7 +708,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system) ...@@ -708,7 +708,7 @@ virSysinfoParseSystem(const char *base, virSysinfoSystemDefPtr *system)
def = NULL; def = NULL;
} }
*system = def; *sysdef = def;
def = NULL; def = NULL;
ret = 0; ret = 0;
cleanup: cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册