summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn van Groningen2007-08-17 11:03:56 +0000
committerJohn van Groningen2007-08-17 11:03:56 +0000
commiteb92ea4f55998ac563bb1c4ab39532d3039ad600 (patch)
treeacfeecede12ec53a3429a302b534ed1d8ab014f5
parentport init and exit code for dll's, (diff)
add volatile to clean_exception_handler argument type to
prevent elimination of assignments by the optimizer of the c compiler
-rw-r--r--scon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scon.c b/scon.c
index b87cb2d..8250e49 100644
--- a/scon.c
+++ b/scon.c
@@ -159,7 +159,7 @@ void *allocate_memory_with_guard_page_at_end (int size)
}
# ifdef USE_CR2
-static void clean_exception_handler (int s,struct sigcontext sigcontext)
+static void clean_exception_handler (int s,volatile struct sigcontext sigcontext)
{
if (
(((size_t)sigcontext.cr2 ^ (size_t)below_stack_page) & -4096)==0 ||
@@ -185,7 +185,7 @@ static void clean_exception_handler (int s,struct sigcontext sigcontext)
# else
static void clean_exception_handler_info (int s,struct siginfo *siginfo_p,void *p);
-static void clean_exception_handler_context (int s,struct sigcontext sigcontext)
+static void clean_exception_handler_context (int s,volatile struct sigcontext sigcontext)
{
struct sigaction sa;