[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8697: possibly-uninitialized variables in find_automatic_composition
From: |
handa |
Subject: |
bug#8697: possibly-uninitialized variables in find_automatic_composition |
Date: |
Thu, 19 May 2011 10:32:54 +0900 |
Very sorry for the late response on this matter.
In article <4D841112.50403@cs.ucla.edu>, Paul Eggert <eggert@cs.ucla.edu>
writes:
> In the Emacs trunk, src/composite.c's find_automatic_composition has
> two local variables 'check' and 'prev' that gcc -Wuninitialized warns
> as being possibly being uninitialized when used. This function has
> multiple gotos and dependencies on data structures that I don't
> understand, so it's not clear to me that GCC is wrong here. So I'm
> filing a bug report in the hopes that someone more expert can look at it.
> I plan to work around the diagnostic by committing the following
> change, which adds a FIXME comment asking for initial value if needed,
> and for the comment to be removed if the code is OK as-is. IF_LINT
> is used to tell GCC not to issue a warning here, for now.
> I'm CC:ing this to Kenichi Handa, who committed the code in question,
> to give him a heads-up about the problem.
Actually, those local variables are surely initialized when
used. But as they are initialized under a specific
condition (e.g. check_val is set to non-nil) and used under
the same condition, it's difficult for gcc to detect that.
Anyway, I've just committed an inproved version of
find_automatic_composition, and gcc won't complain about it
now.
2011-05-18 Kenichi Handa <handa@m17n.org>
* composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
(BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
(find_automatic_composition): Mostly rewrite for efficiency.
---
Kenichi Handa
handa@m17n.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#8697: possibly-uninitialized variables in find_automatic_composition,
handa <=