From: Howard Chu Date: Fri, 9 Mar 2012 05:28:24 +0000 (-0800) Subject: ITS#7191 more alignment tweaks X-Git-Tag: OPENLDAP_REL_ENG_2_4_32~125^2~36 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=15f3e650da0fb2d4f93808c2e1fedad80e31bb59;p=openldap ITS#7191 more alignment tweaks Revealed when gcc optimization is enabled --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 1249e58596..88970e2a10 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -4245,7 +4245,6 @@ new_sub: * DB are all zero size. */ if (do_sub) { - MDB_db *db; int xflags; put_sub: xdata.mv_size = 0; @@ -4279,7 +4278,7 @@ put_sub: xflags |= (flags & MDB_APPEND); rc = mdb_cursor_put(&mc->mc_xcursor->mx_cursor, data, &xdata, xflags); if (flags & F_SUBDATA) { - db = NODEDATA(leaf); + void *db = NODEDATA(leaf); memcpy(db, &mc->mc_xcursor->mx_db, sizeof(MDB_db)); } } @@ -4329,7 +4328,7 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags) if (mc->mc_xcursor->mx_db.md_entries) { if (leaf->mn_flags & F_SUBDATA) { /* update subDB info */ - MDB_db *db = NODEDATA(leaf); + void *db = NODEDATA(leaf); memcpy(db, &mc->mc_xcursor->mx_db, sizeof(MDB_db)); } else { /* shrink fake page */