nstime: fix -Wshift-negative-value
authorPeter Wu <peter@lekensteyn.nl>
Wed, 7 Oct 2015 13:48:46 +0000 (15:48 +0200)
committerPeter Wu <peter@lekensteyn.nl>
Fri, 9 Oct 2015 22:59:26 +0000 (22:59 +0000)
commitb07226775e920b6e2fc39e98d9f92faa5f35b017
treebcb2c21e7c0a871fec6f746db7a4f3518316af72
parent5bdfb5c36be80511bf814fd6e999985edb75d81d
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@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
wsutil/nstime.c