xkbcomp: Changes to 'master'

Julien Cristau jcristau at debian.org
Mon Jul 12 03:16:28 PDT 2010


On Mon, Jul 12, 2010 at 02:29:28 -0700, Daniel Stone wrote:

>  xkbscan.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> New commits:
> commit 61b3d4b024d8146cb0e7659aa958045ceb72c482
> Author: Julien Cristau <jcristau at debian.org>
> Date:   Mon Jul 12 10:28:32 2010 +0100
> 
>     Fix signedness issue with getc() return value
>     
>     getc() and ungetc() return and take, respectively, an int rather than a
>     char to allow for error values as well.  Oops.
>     
>     Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> 
The patch I tested didn't change unscanchar(), and I'm not sure changing
it will work correctly.  On end of file, scanchar() will set
readBuf[readBufPos] to (char)EOF.  Then unscanchar(EOF) will compare EOF
with (char)EOF, which will fail if char is unsigned.

Overall I think it'd be better to just revert the commit introducing
these functions, and let stdio handle the buffering.  And maybe use
getc_unlocked (which is a macro) if available.

Cheers,
Julien


More information about the xorg-devel mailing list