Wireshark-commits: [Wireshark-commits] master b072267: nstime: fix -Wshift-negative-value
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 9 Oct 2015 22:59:33 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=b07226775e920b6e2fc39e98d9f92faa5f35b017
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

b072267 by Peter Wu (peter@xxxxxxxxxxxxx):

    nstime: fix -Wshift-negative-value
    
    Even if the result of the negative shift (in TIME_T_MIN) is not used
    because the signedness check happens before, it still causes a
    compile-time warning. Fix this by shifting on an unsigned value, then
    truncate by casting it.
    
    While at it, remove a "fix for broken SCO compiler", it might not apply
    to us (fingers crossed).
    
    Change-Id: Id9603149d8063e9eaaa65cf028323f10e60a6c42
    Reviewed-on: https://code.wireshark.org/review/10862
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  5bdfb5c   Make sure we can compile without QtMultimedia.
    adds  b072267   nstime: fix -Wshift-negative-value


Summary of changes:
 wsutil/nstime.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)