* libguile/read.c warning
@ 2010-02-15 0:03 Thien-Thi Nguyen
2010-02-15 9:26 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Thien-Thi Nguyen @ 2010-02-15 0:03 UTC (permalink / raw)
To: bug-guile
../../GG/libguile/read.c: In function 'scm_read_expression':
../../GG/libguile/read.c:893: warning: 'charname' may be used uninitialized in this function
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libguile/read.c warning
2010-02-15 0:03 libguile/read.c warning Thien-Thi Nguyen
@ 2010-02-15 9:26 ` Ludovic Courtès
2010-02-15 14:37 ` Thien-Thi Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2010-02-15 9:26 UTC (permalink / raw)
To: bug-guile
Hi,
Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> ../../GG/libguile/read.c: In function 'scm_read_expression':
> ../../GG/libguile/read.c:893: warning: 'charname' may be used uninitialized in this function
Which platform & compiler?
GNU/Linux builds at http://hydra.nixos.org/jobset/gnu/guile-master/all
are done with ‘-Werror’ on GCC 4.4.3 and they don’t have this problem.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libguile/read.c warning
2010-02-15 9:26 ` Ludovic Courtès
@ 2010-02-15 14:37 ` Thien-Thi Nguyen
0 siblings, 0 replies; 3+ messages in thread
From: Thien-Thi Nguyen @ 2010-02-15 14:37 UTC (permalink / raw)
To: bug-guile
() ludo@gnu.org (Ludovic Courtès)
() Mon, 15 Feb 2010 10:26:49 +0100
Which platform & compiler?
$ uname -a
Linux ambire 2.6.18-6-k7 #1 SMP Thu Nov 5 16:59:00 UTC 2009 i686 GNU/Linux
$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Inspection shows that (at least, as of commit 69f90b0b0):
overflow = read_token (port, buffer, READER_CHAR_NAME_MAX_SIZE, &bytes_read);
if (overflow)
goto char_error;
...
char_error:
scm_i_input_error (FUNC_NAME, port, "unknown character name ~a",
scm_list_1 (charname));
if there is an overflow condition, `scm_i_input_error' is called with
`charname' not yet initialized. This is in `scm_read_character',
which differs from the function indicated in the warning message.
I think the fix would be to do:
if (overflow)
scm_i_input_error (FUNC_NAME, port, "character overflow error", SCM_EOL);
or somesuch.
GNU/Linux builds at http://hydra.nixos.org/jobset/gnu/guile-master/all
are done with ‘-Werror’ on GCC 4.4.3 and they don’t have this problem.
Yeah, i'm still clinging onto personal happiness on Debian Etch. It's
high time for a dist-upgrade, but then again, look at all the interesting
bugs we find on the trailing edge! :-D
thi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-15 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15 0:03 libguile/read.c warning Thien-Thi Nguyen
2010-02-15 9:26 ` Ludovic Courtès
2010-02-15 14:37 ` Thien-Thi Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).