Merge branch 'collectd-5.4' into collectd-5.5
authorMarc Fournier <marc.fournier@camptocamp.com>
Tue, 26 Jan 2016 11:18:26 +0000 (12:18 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Tue, 26 Jan 2016 11:18:26 +0000 (12:18 +0100)
src/openvpn.c
src/processes.c

index 93c8f1b..a36de9d 100644 (file)
@@ -525,8 +525,6 @@ static int openvpn_read (void)
        /* call the right read function for every status entry in the list */
        for (i = 0; i < vpn_num; i++)
        {
-               int vpn_read = 0;
-
                fh = fopen (vpn_list[i]->file, "r");
                if (fh == NULL)
                {
index 09e24d2..2d79c7f 100644 (file)
@@ -306,7 +306,9 @@ static void ps_list_register (const char *name, const char *regexp)
                                        "`ProcessMatch' with the same name. "
                                        "All but the first setting will be "
                                        "ignored.");
+#if HAVE_REGEX_H
                        sfree (new->re);
+#endif
                        sfree (new);
                        return;
                }
@@ -1215,8 +1217,8 @@ static int read_fork_rate ()
 #endif /*KERNEL_LINUX */
 
 #if KERNEL_SOLARIS
-static const char *ps_get_cmdline (long pid, /* {{{ */
-               char *buffer, size_t buffer_size)
+static char *ps_get_cmdline (pid_t pid, char *name __attribute__((unused)), /* {{{ */
+    char *buffer, size_t buffer_size)
 {
        char path[PATH_MAX];
        psinfo_t info;
@@ -2308,7 +2310,7 @@ static int ps_read (void)
 
 
                ps_list_add (ps.name,
-                               ps_get_cmdline (pid, cmdline, sizeof (cmdline)),
+                               ps_get_cmdline (pid, ps.name, cmdline, sizeof (cmdline)),
                                &pse);
        } /* while(readdir) */
        closedir (proc);