Fix undefined-shift UBSAN errors

The expression "1 << 31" will cause UBSAN to complain with this error message:
runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

The same operation on unsigned types is fine, however.  This CL replaces the
strings "1 <<" with "1U <<".
4 files changed