inflate.c triggers the following warning in clang version 3.8.0-2ubuntu4:
inflate.c:1507:61: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
~~~ ^
I believe ~0UL << 16 has defined behavior and yields the expected result.