From a117f6c50b082cdd5696af179e6167e5248358b6 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 19 Oct 2016 11:42:24 +0300 Subject: [PATCH] Eliminate 'scope of variable can be reduced' warning in write_fault_handler * os_dep.c [!DARWIN] (GC_write_fault_handler): Move "i" local variable declaration to the inner scope where the variable is actually used. --- os_dep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os_dep.c b/os_dep.c index 315d33f..e64df6f 100644 --- a/os_dep.c +++ b/os_dep.c @@ -3166,16 +3166,16 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void) char * addr = (char *) (exc_info -> ExceptionRecord -> ExceptionInformation[1]); # endif - size_t i; if (SIG_OK && CODE_OK) { register struct hblk * h = (struct hblk *)((word)addr & ~(GC_page_size-1)); GC_bool in_allocd_block; + size_t i; + # ifdef CHECKSUMS GC_record_fault(h); # endif - # ifdef SUNOS5SIGS /* Address is only within the correct physical page. */ in_allocd_block = FALSE; -- 2.7.4