Reuben Thomas
2018-03-10 00:25:46 UTC
I get this warning:
getdtablesize.c:115:12: warning: comparison of 0 <= unsigned
expression is always true [-Wtautological-compare]
&& 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
~ ^ ~~~~~~~~~~~~
According to this Open Group reference page
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html
:
rlim_t: Unsigned integer type used for limit values.
So could the test 0 <= lim.rlim_cur be removed? I looked at the
communications around the introduction of that line, and I can't see
any suggestion that rlim_t is signed in any case.
getdtablesize.c:115:12: warning: comparison of 0 <= unsigned
expression is always true [-Wtautological-compare]
&& 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
~ ^ ~~~~~~~~~~~~
According to this Open Group reference page
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html
:
rlim_t: Unsigned integer type used for limit values.
So could the test 0 <= lim.rlim_cur be removed? I looked at the
communications around the introduction of that line, and I can't see
any suggestion that rlim_t is signed in any case.
--
https://rrt.sc3d.org
https://rrt.sc3d.org