mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
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.
This commit is contained in:
parent
35de7ebe4a
commit
4dc2435aef
4 changed files with 6 additions and 6 deletions
|
@ -383,8 +383,8 @@ scm_print_mb_symbol (exp, port)
|
||||||
char * str;
|
char * str;
|
||||||
int weird;
|
int weird;
|
||||||
int maybe_weird;
|
int maybe_weird;
|
||||||
int mw_pos;
|
int mw_pos = 0; /* initialized to placate compiler */
|
||||||
int inc;
|
int inc = 0; /* same */
|
||||||
xwchar_t c;
|
xwchar_t c;
|
||||||
|
|
||||||
len = SCM_LENGTH (exp);
|
len = SCM_LENGTH (exp);
|
||||||
|
|
|
@ -411,7 +411,7 @@ taloop:
|
||||||
char * str;
|
char * str;
|
||||||
int weird;
|
int weird;
|
||||||
int maybe_weird;
|
int maybe_weird;
|
||||||
int mw_pos;
|
int mw_pos = 0;
|
||||||
|
|
||||||
len = SCM_LENGTH (exp);
|
len = SCM_LENGTH (exp);
|
||||||
str = SCM_CHARS (exp);
|
str = SCM_CHARS (exp);
|
||||||
|
|
|
@ -696,8 +696,8 @@ scm_lreadrecparen (tok_buf, port, name, case_i, sharp, copy)
|
||||||
{
|
{
|
||||||
register int c;
|
register int c;
|
||||||
register SCM tmp;
|
register SCM tmp;
|
||||||
register SCM tl, tl2;
|
register SCM tl, tl2 = SCM_EOL;
|
||||||
SCM ans, ans2;
|
SCM ans, ans2 = SCM_EOL;
|
||||||
/* Need to capture line and column numbers here. */
|
/* Need to capture line and column numbers here. */
|
||||||
int line = SCM_LINUM (port);
|
int line = SCM_LINUM (port);
|
||||||
int column = SCM_COL (port) - 1;
|
int column = SCM_COL (port) - 1;
|
||||||
|
|
|
@ -389,7 +389,7 @@ scm_ithrow (key, args, noreturn)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SCM dynpair;
|
SCM dynpair = SCM_UNDEFINED;
|
||||||
SCM winds;
|
SCM winds;
|
||||||
|
|
||||||
if (noreturn)
|
if (noreturn)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue