On Fri, May 26, 2006 at 07:22:18PM +0100, Alan Cox wrote: > On Gwe, 2006-05-26 at 11:57 -0600, Matthew Wilcox wrote: > > On Fri, May 26, 2006 at 05:29:25PM +0100, Alan Cox wrote: > > > > > > - if (ret == -1) { > > > + if (ret == -1 && capacity < (1ULL << 32)) { > > > /* pick some standard mapping with at most 1024 cylinders, > > > > won't that provoke a gcc warning when sector_t is 32-bit? how about ... > > I don't believe it will as the type is forced to "1ULL" gcc disagrees with you ;-) $ cat test.c unsigned int y; int main(void) { if (y < (1ULL << 32)) return 0; return 1; } $ gcc -O2 -W -Wall -o test test.c test.c: In function ‘main’: test.c:5: warning: comparison is always true due to limited range of data type $ cat test.c unsigned int y; int main(void) { if (((y >> 16) >> 16) > 0) return 0; return 1; } $ gcc -O2 -W -Wall -o test test.c (anyone know how you turn off that fucking UTF8 crap that gcc insists on putting into its warning/error messages? Who thought that was a good idea?) - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html