![]() | ||||||||||
Messages in this thread |
4~On Sat, May 15, 2004 at 03:05:23PM +0200, Thomas Gleixner wrote: > The patch fixes the following warnings, produced by gcc3.3.3: > > s is a unsigned char, which can never be >= MAX_NR_KEYMAPS, as MAX_NR_KEYMAPS > = 256 > - if (i >= NR_KEYS || s >= MAX_NR_KEYMAPS) > + if (i >= NR_KEYS) > return -EINVAL; You see that you break thew source in order to avoid a compiler warning. Bad. (MAX_NR_KEYMAPS is a #define, often 256, on tiny systems people tend to pick 16. The above test is not superfluous. MAX_NR_KEYMAPS is not an absolute constant.) Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | |||||||||
| Last update: 2005-03-22 13:03 [from the cache] ©2003-2008 | ||||||||||