[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from
From: |
Marin Ramesa |
Subject: |
Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC) |
Date: |
Mon, 09 Dec 2013 14:50:15 +0100 |
On 09.12.2013 14:10:32, Richard Braun wrote:
> On Mon, Dec 09, 2013 at 12:59:33PM +0100, Samuel Thibault wrote:
> > No, it's really commenting c != K_DONE which makes the warning
> > away. My current guess is that c gets implicitly casted to int
> > instead of unsigned int.
>
> Just to make sure, I've switched char_idx and max to unsigned int and
> the warning disappeared.
This also works when char_idx and max are ints:
for ( ; (c != K_DONE) && (char_idx <= max) && (char_idx <= WIDTH_KMAP);
char_idx++) {
c = key_map[scancode][char_idx];
(*linesw[tp->t_line].l_rint)(c, tp);
}
- [PATCH 14/14] vm/vm_resident.c: move struct definition to a header file, (continued)
- [PATCH 14/14] vm/vm_resident.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Samuel Thibault, 2013/12/08
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Marin Ramesa, 2013/12/09
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Richard Braun, 2013/12/09
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Marin Ramesa, 2013/12/09
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Richard Braun, 2013/12/09
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Samuel Thibault, 2013/12/09
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Richard Braun, 2013/12/09
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Samuel Thibault, 2013/12/09
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC),
Marin Ramesa <=
- Re: [PATCH 01/14] i386/i386at/kd.c: fix signed overflow (a warning from GCC), Samuel Thibault, 2013/12/15