summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-26 19:37:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-26 19:37:09 -0700
commit0980df79e8a3a03be1b752c74eb228f956180606 (patch)
tree339e5863831f132205cbc4b83f5323e9d1a5ab34
parentb880fb064069f170cda8b7c9399d343db8736b9d (diff)
downloadtxr-0980df79e8a3a03be1b752c74eb228f956180606.tar.gz
txr-0980df79e8a3a03be1b752c74eb228f956180606.tar.bz2
txr-0980df79e8a3a03be1b752c74eb228f956180606.zip
signal: fix warning in older compilers.
* signal.c (sig_handler): Some older compilers cannot figure out that stack_lim is not used uninitialized, due to the conditional logic here, in which two separate code blocks are guarded by the same condition. Let's initialize the variable, like the others.
-rw-r--r--signal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/signal.c b/signal.c
index ad5c9849..9dac7f44 100644
--- a/signal.c
+++ b/signal.c
@@ -81,7 +81,7 @@ static void sig_handler(int sig)
int exc = is_cpu_exception(sig);
int ic = interrupt_count++;
int in_interrupt = ic > 0;
- val *stack_lim;
+ val *stack_lim = 0;
if (exc) {
gc = gc_state(0);