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));
#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;
/* #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];
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];