Browse Source

container_of: work with -Wcast-qual

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell 11 years ago
parent
commit
ba5ad771af
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/container_of/container_of.h

+ 1 - 1
ccan/container_of/container_of.h

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