Wireshark-commits: [Wireshark-commits] master 8b5a50e: Fix some cases where we're shifting a signed
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 1 May 2015 02:55:34 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=8b5a50e2b0107707bd30c89e6797e2c98f1e89a9
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

8b5a50e by Guy Harris (guy@xxxxxxxxxxxx):

    Fix some cases where we're shifting a signed 1 left.
    
    Shift 1U instead, to make sure it's unsigned; the result of, for
    example, the result of shifting a signed value left is undefined if the
    value times 2^{shift count} doesn't fit in the *signed* type of the
    shifted value.  That means, in particular, that the result of shifting 1
    left by {number of bits in an int - 1} is undefined.  (In *practice*,
    it'll probably be -2^32, with the bit you want set, but that's not
    guaranteed, and GCC 5.1 seems not to like it.)
    
    This fixes the *other* generator for the X11 header files; we manually
    fix the file in question, because life's too short to spend very much of
    it trying to debug Perl issues that cause a
    
    	Can't use string ("1") as a HASH ref while "strict refs" in use at
    	../../tools/process-x11-xcb.pl line 675.
    	 at ../../tools/process-x11-xcb.pl line 1859
    	 at ../../tools/process-x11-xcb.pl line 1859
    
    failure.
    
    Change-Id: I3dd46025b2ae461e63034b36ab11cdbc9380b696
    Reviewed-on: https://code.wireshark.org/review/8263
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  510777c   Fix some cases where we're shifting a signed 1 left.
    adds  8b5a50e   Fix some cases where we're shifting a signed 1 left.


Summary of changes:
 epan/dissectors/x11-extension-implementation.h |  212 ++++++++++++------------
 tools/process-x11-xcb.pl                       |    2 +-
 2 files changed, 107 insertions(+), 107 deletions(-)