summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--eval.c6
-rw-r--r--eval_error.c6
-rw-r--r--eval_jump.c3
-rw-r--r--thread.c2
-rw-r--r--vm_eval.c2
6 files changed, 23 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 7139acd82..cd0e77024 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Sat Feb 28 20:09:40 2009 Tanaka Akira <akr@fsij.org>
+
+ * eval_error.c (error_print): use volatile to suppress warnings.
+
+ * vm_eval.c (eval_string_with_cref): ditto.
+
+ * thread.c (rb_exec_recursive): ditto.
+
+ * eval_jump.c (rb_exec_end_proc): ditto.
+
+ * eval.c (ruby_exec_node): ditto.
+ (rb_longjmp): ditto.
+
Sat Feb 28 18:28:58 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (ancillary_unix_rights): check message type.
diff --git a/eval.c b/eval.c
index 051fb8901..8040e8b58 100644
--- a/eval.c
+++ b/eval.c
@@ -193,7 +193,7 @@ ruby_cleanup(int ex)
int
ruby_exec_node(void *n, const char *file)
{
- int state;
+ volatile int state;
VALUE iseq = (VALUE)n;
rb_thread_t *th = GET_THREAD();
@@ -332,13 +332,13 @@ rb_frozen_class_p(VALUE klass)
NORETURN(static void rb_longjmp(int, VALUE));
static void
-rb_longjmp(int tag, VALUE mesg)
+rb_longjmp(int tag, volatile VALUE mesg)
{
VALUE at;
VALUE e;
rb_thread_t *th = GET_THREAD();
const char *file;
- int line = 0;
+ volatile int line = 0;
if (rb_thread_set_raised(th)) {
th->errinfo = exception_error;
diff --git a/eval_error.c b/eval_error.c
index 15233e7c1..ce6bd234f 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -66,11 +66,11 @@ set_backtrace(VALUE info, VALUE bt)
static void
error_print(void)
{
- VALUE errat = Qnil; /* OK */
+ volatile VALUE errat = Qnil; /* OK */
VALUE errinfo = GET_THREAD()->errinfo;
volatile VALUE eclass, e;
- const char *einfo;
- long elen;
+ const char *volatile einfo;
+ volatile long elen;
if (NIL_P(errinfo))
return;
diff --git a/eval_jump.c b/eval_jump.c
index f474844ba..18b6835c9 100644
--- a/eval_jump.c
+++ b/eval_jump.c
@@ -101,7 +101,8 @@ rb_mark_end_proc(void)
void
rb_exec_end_proc(void)
{
- struct end_proc_data *link, *tmp;
+ struct end_proc_data *volatile link;
+ struct end_proc_data *tmp;
int status;
volatile int safe = rb_safe_level();
diff --git a/thread.c b/thread.c
index 38e46c3da..a2c882cff 100644
--- a/thread.c
+++ b/thread.c
@@ -3345,7 +3345,7 @@ recursive_pop(VALUE hash, VALUE obj)
VALUE
rb_exec_recursive(VALUE (*func) (VALUE, VALUE, int), VALUE obj, VALUE arg)
{
- VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
+ volatile VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
VALUE objid = rb_obj_id(obj);
if (recursive_check(hash, objid)) {
diff --git a/vm_eval.c b/vm_eval.c
index 1b6ffe28b..50dea4c05 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -688,7 +688,7 @@ rb_each(VALUE obj)
}
static VALUE
-eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char *file, int line)
+eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, const char *volatile file, volatile int line)
{
int state;
VALUE result = Qundef;