Code

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 e7b247e77e8fa983d131012d1149c869c24e5ff9..98ceb6d3dc78cec10bd7ed4966ee5d50a7204567 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;
        }