X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbattery.c;h=b62ad81df35b4686d7844ccd2d565e38e1365e83;hb=be99a844a40d7037a910d37a894988b807631a6e;hp=70d0486b9b25ed602b3d2d72cd3ccb62f5c7b524;hpb=98ace6ba53855a4984e79bd7a6ed9a785478ba4f;p=collectd.git diff --git a/src/battery.c b/src/battery.c index 70d0486b..b62ad81d 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; @@ -441,7 +440,7 @@ static int battery_read (void) /* #endif HAVE_IOKIT_IOKITLIB_H || HAVE_IOKIT_PS_IOPOWERSOURCES_H */ #elif KERNEL_LINUX - static c_complain_t acpi_dir_complaint = C_COMPLAIN_INIT; + static c_complain_t acpi_dir_complaint = C_COMPLAIN_INIT_STATIC; FILE *fh; char buffer[1024];