From e1106faa01d8881243a3e4dbd9effa3aebb9c9cc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 20 Oct 2016 20:10:01 -0700 Subject: obj_print: use of volatile. * lib.c (obj_print): The ret variable doesn't have to be volatile qualified, because it is never modified after setting an exception handler, and then accessed in the cleanup. On the other hand, the ctx variable is manipulated this way and must be volatile. --- lib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib.c b/lib.c index 1b3996c9..834685b4 100644 --- a/lib.c +++ b/lib.c @@ -9427,11 +9427,12 @@ tail: val obj_print(val obj, val stream) { - volatile val ret = nil; + val ret = nil; val out = default_arg(stream, std_output); val save_mode = get_indent_mode(out); val save_indent = get_indent(out); - struct strm_ctx *ctx_orig = get_ctx(out), *ctx = ctx_orig, ctx_struct; + struct strm_ctx *ctx_orig = get_ctx(out); + struct strm_ctx *volatile ctx = ctx_orig, ctx_struct; uw_simple_catch_begin; @@ -9467,7 +9468,8 @@ val obj_pprint(val obj, val stream) val out = default_arg(stream, std_output); val save_mode = get_indent_mode(out); val save_indent = get_indent(out); - struct strm_ctx *ctx_orig = get_ctx(out), *ctx = ctx_orig, ctx_struct; + struct strm_ctx *ctx_orig = get_ctx(out); + struct strm_ctx *volatile ctx = ctx_orig, ctx_struct; uw_simple_catch_begin; -- cgit v1.2.3