Fixing cast-align warning in ovdb

Julien ÉLIE julien at trigofacile.com
Sat Sep 1 20:11:33 UTC 2018


Hi all,

Does anyone have a clue about how to fix the following new warnings emitted by GCC 8?  (without of course generating another different warning)

ovdb/ovdb.c: In function 'ovdb_add':
ovdb/ovdb.c:1951:6: error: cast increases required alignment of target type [-Werror=cast-align]
     ((struct ovdata *)databuf)->token = token;
      ^
ovdb/ovdb.c:1952:6: error: cast increases required alignment of target type [-Werror=cast-align]
     ((struct ovdata *)databuf)->arrived = arrived;
      ^
ovdb/ovdb.c:1953:6: error: cast increases required alignment of target type [-Werror=cast-align]
     ((struct ovdata *)databuf)->expires = expires;
      ^

ovdb_stat.c: In function 'print_value':
ovdb_stat.c:157:7: warning: cast increases required alignment of target type [-Werror=cast-align]
  dl = (DB_LSN *)(cp + tab[i].a);
       ^

-- 
Julien ÉLIE

« Tuto, cito, iucunde. » (Esculape)


More information about the inn-workers mailing list