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

ruby-changes:16379

From: naruse <ko1@a...>
Date: Fri, 18 Jun 2010 10:47:20 +0900 (JST)
Subject: [ruby-changes:16379] Ruby:r28359 (trunk): * gc.c (gc_lazy_sweep): clean a warning.

naruse	2010-06-18 10:44:52 +0900 (Fri, 18 Jun 2010)

  New Revision: 28359

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

  Log:
    * gc.c (gc_lazy_sweep): clean a warning.
      "suggest parentheses around assignment used as truth value"
    
    * transcode_data.h (getGB4bt1): clean a warning.
      "suggest parentheses around arithmetic in operand of |"
    
    * transcode_data.h (getGB4bt3): ditto.
    
    * vm.c (thread_free): clean a warning. "format 'p' expects type
      'void *', but argument 3 has type 'struct rb_mutex_struct *'"

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/transcode_data.h
    trunk/vm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28358)
+++ ChangeLog	(revision 28359)
@@ -1,3 +1,16 @@
+Fri Jun 18 10:37:46 2010  NARUSE, Yui  <naruse@r...>
+
+	* gc.c (gc_lazy_sweep): clean a warning.
+	  "suggest parentheses around assignment used as truth value"
+
+	* transcode_data.h (getGB4bt1): clean a warning.
+	  "suggest parentheses around arithmetic in operand of |"
+
+	* transcode_data.h (getGB4bt3): ditto.
+
+	* vm.c (thread_free): clean a warning. "format 'p' expects type
+	  'void *', but argument 3 has type 'struct rb_mutex_struct *'"
+
 Fri Jun 18 10:15:12 2010  NARUSE, Yui  <naruse@r...>
 
 	* ruby.c: add prototype of rb_realpath_internal.
Index: gc.c
===================================================================
--- gc.c	(revision 28358)
+++ gc.c	(revision 28359)
@@ -2042,7 +2042,8 @@
     GC_PROF_TIMER_START;
     GC_PROF_SWEEP_TIMER_START;
 
-    if (res = lazy_sweep(objspace)) {
+    res = lazy_sweep(objspace);
+    if (res) {
         GC_PROF_SWEEP_TIMER_STOP;
         GC_PROF_SET_MALLOC_INFO;
         GC_PROF_TIMER_STOP(Qfalse);
Index: vm.c
===================================================================
--- vm.c	(revision 28358)
+++ vm.c	(revision 28359)
@@ -1703,7 +1703,7 @@
 	    rb_bug("thread_free: locking_mutex must be NULL (%p:%ld)", (void *)th, th->locking_mutex);
 	}
 	if (th->keeping_mutexes != NULL) {
-	    rb_bug("thread_free: keeping_mutexes must be NULL (%p:%p)", (void *)th, th->keeping_mutexes);
+	    rb_bug("thread_free: keeping_mutexes must be NULL (%p:%p)", (void *)th, (void *)th->keeping_mutexes);
 	}
 
 	if (th->local_storage) {
Index: transcode_data.h
===================================================================
--- transcode_data.h	(revision 28358)
+++ transcode_data.h	(revision 28359)
@@ -56,9 +56,9 @@
 #define getBT0(a)	(((unsigned char)((a)>> 5)&0x07)|0xF0)   /* for UTF-8 only!!! */
 
 #define getGB4bt0(a)	((unsigned char)((a)>> 8))
-#define getGB4bt1(a)	((unsigned char)((a)>>24)&0x0F|0x30)
+#define getGB4bt1(a)	(((unsigned char)((a)>>24)&0x0F)|0x30)
 #define getGB4bt2(a)	((unsigned char)((a)>>16))
-#define getGB4bt3(a)	((unsigned char)((a)>>28)&0x0F|0x30)
+#define getGB4bt3(a)	(((unsigned char)((a)>>28)&0x0F)|0x30)
 
 #define o2FUNii(b1,b2)	(PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|FUNii))
 

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

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