I noticed 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.
---
Pushing under the trivial rule.
src/node_device/node_device_udev.c | 4 ++--
src/nodeinfo.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 438c2eb..6418015 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -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;
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 26f8dc1..7e993a9 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -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;
--
1.7.7.6
Show replies by date