]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
build: avoid s390 compiler warnings
authorEric Blake <eblake@redhat.com>
Tue, 10 Apr 2012 15:46:01 +0000 (09:46 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 10 Apr 2012 15:51:51 +0000 (09:51 -0600)
I noticed these compiler warnings when building for the s390 architecture.

* src/node_device/node_device_udev.c (udevDeviceMonitorStartup):
Mark unused variable.
* src/nodeinfo.c (linuxNodeInfoCPUPopulate): Avoid unused variable.

src/node_device/node_device_udev.c
src/nodeinfo.c

index 438c2ebbf42a79036bc1f92356d69794d8333a84..6418015a53db2cdb0ac8980fbd07216576d3855b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * node_device_udev.c: node device enumeration - libudev implementation
  *
- * Copyright (C) 2009-2011 Red Hat, Inc.
+ * Copyright (C) 2009-2012 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -1604,7 +1604,7 @@ out:
     return ret;
 }
 
-static int udevDeviceMonitorStartup(int privileged)
+static int udevDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
 {
     udevPrivate *priv = NULL;
     struct udev *udev = NULL;
index 26f8dc19ebe223d999c8293dc3c4057060226d78..7e993a9ff46ee406a43577047797d29b0dbdfa98 100644 (file)
@@ -231,10 +231,10 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
 
     /* NOTE: hyperthreads are ignored here; they are parsed out of /sys */
     while (fgets(line, sizeof(line), cpuinfo) != NULL) {
-        char *buf = line;
 # if defined(__x86_64__) || \
     defined(__amd64__)  || \
     defined(__i386__)
+        char *buf = line;
         if (STRPREFIX(buf, "cpu MHz")) {
             char *p;
             unsigned int ui;
@@ -253,6 +253,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
         }
 # elif defined(__powerpc__) || \
       defined(__powerpc64__)
+        char *buf = line;
         if (STRPREFIX(buf, "clock")) {
             char *p;
             unsigned int ui;