Skip to content

Commit

Permalink
Correcting linux warning about invalid use of offsetof
Browse files Browse the repository at this point in the history
  • Loading branch information
codemercenary committed Jul 30, 2014
1 parent 047f627 commit 6d314ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autowiring/test/ContextMemberTest.cpp
Expand Up @@ -31,7 +31,7 @@ class HasAFewSlots:
Autowired<SimpleObject> m_sobj;
};

#define offsetof_nowarn(s,m) (size_t)&reinterpret_cast<const volatile char&>((((s *)0)->m))
#define offsetof_nowarn(s,m) ((size_t)&reinterpret_cast<const volatile char&>((((s *)1)->m)) - 1)

TEST_F(ContextMemberTest, VerifyDetectedMembers)
{
Expand Down

0 comments on commit 6d314ec

Please sign in to comment.