From 95573b36fd8130d5925f877a83b959c22aac1dfd Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 31 May 2016 15:30:40 -0400 Subject: [PATCH] tcon: avoid error 'expected `void *` but argument is of type `const void *`' in tcon_container_of() I did not see any failures of other modules with this change, but I'm not completely certain there are no cases that it breaks. Signed-off-by: Cody P Schafer --- ccan/tcon/tcon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccan/tcon/tcon.h b/ccan/tcon/tcon.h index 1dbadafc..247a7331 100644 --- a/ccan/tcon/tcon.h +++ b/ccan/tcon/tcon.h @@ -330,7 +330,7 @@ canary, tcon_container_of_((member_ptr), \ tcon_offset((x), canary))) -static inline void *tcon_container_of_(void *member_ptr, size_t offset) +static inline void *tcon_container_of_(const void *member_ptr, size_t offset) { return member_ptr ? (char *)member_ptr - offset : NULL; } -- 2.39.2