aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--gc.c3
-rw-r--r--transcode_data.h4
-rw-r--r--vm.c2
4 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d3fbfd790d..1811a7b53f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Fri Jun 18 10:37:46 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* ruby.c: add prototype of rb_realpath_internal.
diff --git a/gc.c b/gc.c
index 58e4550bdb..8750a27176 100644
--- a/gc.c
+++ b/gc.c
@@ -2042,7 +2042,8 @@ gc_lazy_sweep(rb_objspace_t *objspace)
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);
diff --git a/transcode_data.h b/transcode_data.h
index 61146d2c83..d0f3d0f764 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -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))
diff --git a/vm.c b/vm.c
index 3516024dd5..dd5de1f4b7 100644
--- a/vm.c
+++ b/vm.c
@@ -1703,7 +1703,7 @@ thread_free(void *ptr)
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) {