simon-svn: putty: simon

tartarus-commits at lists.tartarus.org tartarus-commits at lists.tartarus.org
Tue Aug 15 21:29:02 BST 2006


SVN root:       svn://ixion.tartarus.org/main
Changes by:     simon
Revision:       6789
Date:           2006-08-15 21:29:02 +0100 (Tue, 15 Aug 2006)

Log message (11 lines):
Shifts left and right by 32 were tripping a gcc warning (fatal with
-Werror, of course) about shifting by more than the range of a data
type. They only appeared in `if' statements testing sizeof(off_t),
but gcc warns even when the code is unreachable. I've removed the
conditional code (the general case should still work even on 32-bit
machines), and hacked each shift by 32 into a pair of shifts by 16.

Note that the gcc warning is not just a helpful indication that you
may be using the wrong data type; it's actually pointing out ANSI-
undefined behaviour in shifting a signed integer beyond the size of
its type.

Modified files:
U   putty/unix/uxsftp.c

Links:
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi?rev=6789&view=rev
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/putty/unix/uxsftp.c?rev=6789&r1=6788&r2=6789



More information about the tartarus-commits mailing list