diff --git a/src/battery.c b/src/battery.c
index 3e726991c76337421b9d126a886d041bd2a8d372..d921484dc74e410191aee2fbc08d37dddfc1db52 100644 (file)
--- a/src/battery.c
+++ b/src/battery.c
/**
* collectd - src/battery.c
* Copyright (C) 2006,2007 Florian octo Forster
+ * Copyright (C) 2008 Michał Mirosław
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
*
* Authors:
* Florian octo Forster <octo at verplant.org>
+ * Michał Mirosław <mirq-linux at rere.qmqm.pl>
**/
#include "collectd.h"
@@ -100,7 +102,6 @@ static void battery_submit (const char *plugin_instance, const char *type, doubl
vl.values = values;
vl.values_len = 1;
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "battery", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
@@ -110,7 +111,7 @@ static void battery_submit (const char *plugin_instance, const char *type, doubl
} /* void battery_submit */
#if HAVE_IOKIT_PS_IOPOWERSOURCES_H || HAVE_IOKIT_IOKITLIB_H
-double dict_get_double (CFDictionaryRef dict, char *key_string)
+static double dict_get_double (CFDictionaryRef dict, char *key_string)
{
double val_double;
long long val_int;
#endif /* HAVE_IOKIT_IOKITLIB_H */
#if KERNEL_LINUX
-static int battery_read_acpi (const char *dir, const char *name,
- void *user_data)
+static int battery_read_acpi (const char __attribute__((unused)) *dir,
+ const char *name, void __attribute__((unused)) *user_data)
{
double current = INVALID_VALUE;
double voltage = INVALID_VALUE;
if (0 == access (battery_acpi_dir, R_OK))
walk_directory (battery_acpi_dir, battery_read_acpi,
- /* user_data = */ NULL);
+ /* user_data = */ NULL,
+ /* include hidden */ 0);
else
{
char errbuf[1024];