use offsetof macro to make scan-build happy