The buildbot indicates that r1197 introduced this warning:
mapiproxy/servers/default/emsmdb/oxcstor.c:256: warning: dereferencing
type-punned pointer will break strict-aliasing rules
I think it is harmless, but I'd still like to make it go away if possible.
Is this patch OK as a fix?
--- mapiproxy/servers/default/emsmdb/oxcstor.c (revision 1197)
+++ mapiproxy/servers/default/emsmdb/oxcstor.c (working copy)
@@ -244,6 +244,7 @@
enum MAPISTATUS retval;
struct mapi_handles *rec = NULL;
struct emsmdbp_object *object = NULL;
+ void *priv_data = NULL;
const char *MessageClass = NULL;
uint32_t handle;
int i;
@@ -253,7 +254,8 @@
retval = mapi_handles_search(emsmdbp_ctx->handles_ctx, handle, &rec);
OPENCHANGE_RETVAL_IF(retval, retval, NULL);
- retval = mapi_handles_get_private_data(rec, (void **)&object);
+ retval = mapi_handles_get_private_data(rec, &priv_data);
+ object = (struct emsmdbp_object*)priv_data;
OPENCHANGE_RETVAL_IF(retval, retval, NULL);
OPENCHANGE_RETVAL_IF(object->type != EMSMDBP_OBJECT_MAILBOX,
MAPI_E_NO_SUPPORT, NULL);
Brad
_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel