Code

Merge branch 'collectd-5.4' into collectd-5.5
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 3 Mar 2016 20:32:38 +0000 (21:32 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 3 Mar 2016 20:32:38 +0000 (21:32 +0100)
src/bind.c
src/collectdctl.c
src/daemon/plugin.c
src/daemon/utils_cache.c
src/liboconfig/oconfig.c
src/logfile.c
src/notify_email.c
src/ntpd.c
src/perl.c
src/python.c

index 27164fd464fb2b024cb55048a85b530e64b5309e..6eac159cbcf78b1f36651aa7468f389a9baf74a8 100644 (file)
@@ -836,8 +836,6 @@ static int bind_xml_stats_search_zones (int version, xmlDoc *doc, /* {{{ */
 
   for (i = 0; i < zone_nodes->nodesetval->nodeNr; i++)
   {
-    xmlNode *node;
-
     node = zone_nodes->nodesetval->nodeTab[i];
     assert (node != NULL);
 
index 8357ce841838cad2f85238b5bbe3ba1758e1db43..d019d2742f3db6bef5d98f653ed144cdf4a42895 100644 (file)
@@ -551,14 +551,14 @@ int main (int argc, char **argv) {
   int status;
 
   while (42) {
-    int c;
+    int n;
 
-    c = getopt (argc, argv, "s:h");
+    n = getopt (argc, argv, "s:h");
 
-    if (c == -1)
+    if (n == -1)
       break;
 
-    switch (c) {
+    switch (n) {
       case 's':
         snprintf (address, sizeof (address), "unix:%s", optarg);
         address[sizeof (address) - 1] = '\0';
index 29716185db38b7ac59d9dc8a9bfe144812794c04..73d0156879d65c354b000cfd4a1267090c148e07 100644 (file)
@@ -1567,7 +1567,6 @@ int plugin_unregister_notification (const char *name)
 void plugin_init_all (void)
 {
        char const *chain_name;
-       long write_threads_num;
        llentry_t *le;
        int status;
 
index 8c5db31662edcb49ce85390dd4d850a7dd5ae837..45444c7f912b4575984ca1937240beb3ce04ba12 100644 (file)
@@ -754,7 +754,6 @@ int uc_get_history_by_name (const char *name,
   if (ce->history_length < num_steps)
   {
     gauge_t *tmp;
-    size_t i;
 
     tmp = realloc (ce->history, sizeof (*ce->history)
        * num_steps * ce->values_num);
index 0217308709c0f0db6456393adfebf4c3f7644cc8..5d2c5b2afa7a7907b6a2e3139fcf7357f563f0ae 100644 (file)
@@ -53,8 +53,6 @@ oconfig_item_t *oconfig_parse_fh (FILE *fh)
   yyset_in (fh);
 
   if (NULL == c_file) {
-    int status;
-
     status = snprintf (file, sizeof (file), "<fd#%d>", fileno (fh));
 
     if ((status < 0) || (status >= sizeof (file))) {
index b75ecb8b39878843b5ca4abf21d89db38e2fa155..11797182639e35902be3e431022f667d9eb99839 100644 (file)
@@ -201,7 +201,7 @@ static int logfile_notification (const notification_t *n,
 
 #define APPEND(bufptr, buflen, key, value) \
        if ((buflen > 0) && (strlen (value) > 0)) { \
-               int status = ssnprintf (bufptr, buflen, ", %s = %s", key, value); \
+               status = ssnprintf (bufptr, buflen, ", %s = %s", key, value); \
                if (status > 0) { \
                        bufptr += status; \
                        buflen -= status; \
index 24c66ec051b965aa5cbfedd228d774430d951c53..76d48d445825c83834d93095ed35420ce288b7d1 100644 (file)
@@ -293,7 +293,6 @@ static int notify_email_notification (const notification_t *n,
 
   /* Initiate a connection to the SMTP server and transfer the message. */
   if (!smtp_start_session (session)) {
-    char buf[MAXSTRING];
     ERROR ("notify_email plugin: SMTP server problem: %s",
         smtp_strerror (smtp_errno (), buf, sizeof buf));
     pthread_mutex_unlock (&session_lock);
index ceb1442c0568b1c0c633ffac1b087816f3926ced..ce54e029e7124c673cddcc9a6293ded9e71e9bf7 100644 (file)
@@ -166,16 +166,16 @@ struct resp_pkt
 /* l_fp to double */
 #define M_LFPTOD(r_i, r_uf, d) \
        do { \
-               register int32_t  i; \
-               register uint32_t f; \
+               register int32_t  ri; \
+               register uint32_t rf; \
                \
-               i = (r_i); \
-               f = (r_uf); \
-               if (i < 0) { \
-                       M_NEG(i, f); \
-                       (d) = -((double) i + ((double) f) / 4294967296.0); \
+               ri = (r_i); \
+               rf = (r_uf); \
+               if (ri < 0) { \
+                       M_NEG(ri, rf); \
+                       (d) = -((double) ri + ((double) rf) / 4294967296.0); \
                } else { \
-                       (d) = (double) i + ((double) f) / 4294967296.0; \
+                       (d) = (double) ri + ((double) rf) / 4294967296.0; \
                } \
        } while (0)
 
index 3b498f9b7ea348caf5048bc27932ccf3e0deb714..19ac08d4274156c168a1c2f0bd7a8d461a55acfc 100644 (file)
@@ -2085,7 +2085,7 @@ static int perl_shutdown (void)
                return 0;
 
        if (NULL == aTHX) {
-               c_ithread_t *t = NULL;
+               t = NULL;
 
                pthread_mutex_lock (&perl_threads->mutex);
                t = c_ithread_create (perl_threads->head->interp);
index c7a82c49ee6aa7a3abb2c8ed729d90b736d5110f..9d732772d9c77167fde1297df2886ef87e0d1ab5 100644 (file)
@@ -399,7 +399,7 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li
                }
                dict = PyDict_New();  /* New reference. */
                if (value_list->meta) {
-                       int i, num;
+                       int num;
                        char **table;
                        meta_data_t *meta = value_list->meta;