bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] vi_mode.c:136: warning: comparison between signed and uns


From: Dave Caroline
Subject: [Bug-readline] vi_mode.c:136: warning: comparison between signed and unsigned
Date: Sat, 23 May 2009 18:39:09 +0100

version
readline-6.0

OS
Ubuntu Hardy
Linux hp 2.6.24-23-generic #1 SMP Mon Jan 26 01:04:16 UTC 2009 x86_64 GNU/Linux

compile options
gcc -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"6.0"' -g -O
-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare
-DREADLINE_LIBRARY -c ./vi_mode.c

# a description of the bug
counter i uses a signed int but the result from sizeof() is unsigned

# a recipe for recreating the bug reliably
gcc -DHAVE_CONFIG_H    -I. -I. -DRL_LIBRARY_VERSION='"6.0"' -g -O
-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare
-DREADLINE_LIBRARY -c ./vi_mode.c

# a fix for the bug if you have one!

134c134
<   register int i;
---
>   register unsigned i;

Dave Caroline




reply via email to

[Prev in Thread] Current Thread [Next in Thread]