[前][次][番号順一覧][スレッド一覧]

ruby-changes:34467

From: normal <ko1@a...>
Date: Wed, 25 Jun 2014 15:55:19 +0900 (JST)
Subject: [ruby-changes:34467] normal:r46548 (trunk): ccan/container_of/container_of.h: avoid warning with -Wcast-qual

normal	2014-06-25 15:55:10 +0900 (Wed, 25 Jun 2014)

  New Revision: 46548

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46548

  Log:
    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)]

  Modified files:
    trunk/ChangeLog
    trunk/ccan/container_of/container_of.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46547)
+++ ChangeLog	(revision 46548)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jun 25 15:44:12 2014  Eric Wong  <e@8...>
+
+	* 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@r...>
 
 	* hash.c (env_aset, env_has_key, env_assoc, env_has_value),
Index: ccan/container_of/container_of.h
===================================================================
--- ccan/container_of/container_of.h	(revision 46547)
+++ ccan/container_of/container_of.h	(revision 46548)
@@ -100,7 +100,7 @@ https://github.com/ruby/ruby/blob/trunk/ccan/container_of/container_of.h#L100
 	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 */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]