X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbattery.c;h=4178d8b5145f2b728e5c7c949d72ebd8d126a89e;hb=0eff156c7816507fa1865b76e948574dd320fae0;hp=578884af6172b7bfced6bb442ab8e928ca9dcc4f;hpb=4fcf23160e7d3fd034dc7e807cbf4047970dd218;p=collectd.git diff --git a/src/battery.c b/src/battery.c index 578884af..4178d8b5 100644 --- a/src/battery.c +++ b/src/battery.c @@ -102,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)); @@ -319,8 +318,8 @@ static void get_via_generic_iokit (double *ret_charge, #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; @@ -515,7 +514,8 @@ static int battery_read (void) 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];