Add casts to squelch compiler warnings.

Change-Id: I100ec30e1e9ac204e3c9225278adc8a26992542a
Reviewed-on: https://code.wireshark.org/review/3114
Reviewed-by: Guy Harris <guy@alum.mit.edu>