Skip to content

Commit

Permalink
Merge pull request #10 from leapmotion/bug-offsetwarn
Browse files Browse the repository at this point in the history
Correcting linux warning about invalid use of offsetof
  • Loading branch information
gtremper committed Jul 30, 2014
2 parents 047f627 + 6d314ec commit b83755d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autowiring/test/ContextMemberTest.cpp
Original file line number Diff line number Diff line change
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 b83755d

Please sign in to comment.