summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-28 11:12:36 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-28 11:12:36 +0000
commit15e9a765de7fea99d55b57aff6d2046ddfe4baad (patch)
tree30db52afb4a43f0e36e1513fb443c21149aa0d61 /eval.c
parent2e3f5375232927f797dd6bb8012ef73e693df639 (diff)
downloadruby-15e9a765de7fea99d55b57aff6d2046ddfe4baad.tar.gz
ruby-15e9a765de7fea99d55b57aff6d2046ddfe4baad.tar.xz
ruby-15e9a765de7fea99d55b57aff6d2046ddfe4baad.zip
* 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. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 3 insertions, 3 deletions
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;