Craig Rodrigues wrote:
> I tried the following and was able to compile without warning:
>
> Index: imsg.c
> ===
> --- imsg.c (revision 290924)
> +++ imsg.c (working copy)
> @@ -74,7 +74,7 @@
>
> again:
> if (getdta
On Mon, Nov 16, 2015 at 9:03 AM, Philip Guenther wrote:
> >> integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
> >> >= getdtablesize()) {
> >> ^ ~~~
> >> 1 warning generated.
>
> Out of curiousity, in your experience how often is that war
> > Both OSs define getdtablesize() as sysconf(_SC_OPEN_MAX). sysconf(3)
> > returns a long, so it seems more correct to make getdtablesize(3) return
> > a long or ssize_t. The return value has to be signed because sysconf(3)
> > is specified by POSIX to return -1 and set errno on failure.
>
> No,
> Date: Mon, 16 Nov 2015 11:41:09 -0500
> From: Michael McConville
>
> Craig Rodrigues wrote:
> > Recently, I imported imsg.c from OpenBSD to the
> > FreeBSD base system's libopenbsd:
> >
> > https://svnweb.freebsd.org/changeset/base/290375
> >
> > When compiling on FreeBSD, we get a compiler w
On Mon, Nov 16, 2015 at 8:41 AM, Michael McConville wrote:
> Craig Rodrigues wrote:
>> Recently, I imported imsg.c from OpenBSD to the
>> FreeBSD base system's libopenbsd:
>>
>> https://svnweb.freebsd.org/changeset/base/290375
>>
>> When compiling on FreeBSD, we get a compiler warning with clang:
> Both OSs define getdtablesize() as sysconf(_SC_OPEN_MAX). sysconf(3)
> returns a long, so it seems more correct to make getdtablesize(3) return
> a long or ssize_t. The return value has to be signed because sysconf(3)
> is specified by POSIX to return -1 and set errno on failure.
Don't be ridicu
Craig Rodrigues wrote:
> Recently, I imported imsg.c from OpenBSD to the
> FreeBSD base system's libopenbsd:
>
> https://svnweb.freebsd.org/changeset/base/290375
>
> When compiling on FreeBSD, we get a compiler warning with clang:
>
> cc -O2 -pipe -I/opt2/branches/head2/lib/libopenbsd -std=gn
Hi,
Recently, I imported imsg.c from OpenBSD to the
FreeBSD base system's libopenbsd:
https://svnweb.freebsd.org/changeset/base/290375
When compiling on FreeBSD, we get a compiler warning with clang:
cc -O2 -pipe -I/opt2/branches/head2/lib/libopenbsd -std=gnu99
-fstack-protector-strong -Wsys