ccan/container_of/container_of.h: avoid warning with -Wcast-qual

* ccan/container_of/container_of.h (container_off_var):
  avoid warning with -Wcast-qual
  [ccan ba5ad771af4aa9e085498de6c3c665c52694460f (Rusty Russell)]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2014-06-25 06:55:10 +00:00
parent 51a1c68bc7
commit 57c9c3189a
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Wed Jun 25 15:44:12 2014 Eric Wong <e@80x24.org>
* ccan/container_of/container_of.h (container_off_var):
avoid warning with -Wcast-qual
[ccan ba5ad771af4aa9e085498de6c3c665c52694460f (Rusty Russell)]
Wed Jun 25 10:19:59 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* hash.c (env_aset, env_has_key, env_assoc, env_has_value),

View File

@ -100,7 +100,7 @@
container_off(typeof(*var), member)
#else
#define container_off_var(var, member) \
((char *)&(var)->member - (char *)(var))
((const char *)&(var)->member - (const char *)(var))
#endif
#endif /* CCAN_CONTAINER_OF_H */