summaryrefslogtreecommitdiff
path: root/libguile/mbstrings.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@red-bean.com>1996-12-18 21:42:09 +0000
committerJim Blandy <jimb@red-bean.com>1996-12-18 21:42:09 +0000
commit4dc2435aef1e447fe0cf370edb1db7d9f37fe385 (patch)
tree0122d9ce268c1885b84898cbcee4713e7659ccf5 /libguile/mbstrings.c
parent35de7ebe4a2f424a49bdcc856baaa0d61b978809 (diff)
downloadguile-4dc2435aef1e447fe0cf370edb1db7d9f37fe385.tar.gz
In some cases, the code is fine, but GCC isn't smart enough to
figure that out; this usually happens when one variable is only initialized and used when a particular condition holds true, and we know that condition will never change within a given invocation of the function. In this case, we simply initialize the variables to placate the compiler, hopefully to a value which will cause a crash if it is ever actually used. * print.c (scm_iprin1): Initialize mw_pos. * read.c (scm_lreadrecparen): Initialize tl2, ans2. * throw.c (scm_ithrow): Initialize dynpair. * unif.c (scm_uniform_vector_ref): Initialize cra. * struct.c (init_struct): Initialize prot. * mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
Diffstat (limited to 'libguile/mbstrings.c')
-rw-r--r--libguile/mbstrings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/mbstrings.c b/libguile/mbstrings.c
index 520847596..41e04bf80 100644
--- a/libguile/mbstrings.c
+++ b/libguile/mbstrings.c
@@ -383,8 +383,8 @@ scm_print_mb_symbol (exp, port)
char * str;
int weird;
int maybe_weird;
- int mw_pos;
- int inc;
+ int mw_pos = 0; /* initialized to placate compiler */
+ int inc = 0; /* same */
xwchar_t c;
len = SCM_LENGTH (exp);