Code

postgresql plugin: Fixed a possibly uninitialized variable warning.
authorSebastian Harl <sh@tokkee.org>
Sun, 19 Aug 2012 19:43:42 +0000 (21:43 +0200)
committerSebastian Harl <sh@tokkee.org>
Sun, 19 Aug 2012 19:43:42 +0000 (21:43 +0200)
This was identified by 'gcc -O2'.

src/postgresql.c

index 34ce527e8a76f216e71a9c5f1d20a6ab8fd9a820..9d6c86bc89fdcdaa43131ef79f0307adb3b823e4 100644 (file)
@@ -659,7 +659,7 @@ static char *values_to_sqlarray (const data_set_t *ds, const value_list_t *vl,
        str_len = string_len;
 
        for (i = 0; i < vl->values_len; ++i) {
-               int status;
+               int status = 0;
 
                if ((ds->ds[i].type != DS_TYPE_GAUGE)
                                && (ds->ds[i].type != DS_TYPE_COUNTER)