postgresql plugin: Fix cast (was breaking aliasing rules).
authorFlorian Forster <octo@collectd.org>
Sun, 3 Feb 2013 09:46:06 +0000 (10:46 +0100)
committerFlorian Forster <octo@collectd.org>
Sun, 3 Feb 2013 09:46:06 +0000 (10:46 +0100)
postgresql.c: In function 'c_psql_flush':
postgresql.c:974: warning: dereferencing type-punned pointer will break strict-aliasing rules

src/postgresql.c

index e7b247e..98ceb6d 100644 (file)
@@ -971,7 +971,7 @@ static int c_psql_flush (cdtime_t timeout,
        size_t i;
 
        if ((ud != NULL) && (ud->data != NULL)) {
-               dbs = (c_psql_database_t **)&ud->data;
+               dbs = (void *)&ud->data;
                dbs_num = 1;
        }