cms-sw/cmssw — pull request #5328 by davidlt (2014-09-17 07:04:17+00:00)
Title: Clean up undefined behavior in PixelChannelIdentifier.h

Errors reported by ubsan (undefined behavior) with GCC 4.9.1:

PixelChannelIdentifier.h:40:22: runtime error: left shift of
negative value -1
PixelChannelIdentifier.h:41:26: runtime error: left shift of negative
value -1
PixelChannelIdentifier.h:42:23: runtime error: left shift of negative
value -1
PixelChannelIdentifier.h:43:22: runtime error: left shift of negative
value -1
PixelChannelIdentifier.h:44:25: runtime error: left shift of negative
value -1

(1) Change ctor arguments to be unsigned int. Left shifting by a
negative number is udefined behavior.

(2) ~0 == -1, left shifting such number is undefined behavior.

Signed-off-by: David Abdurachmanov