passing 'int *' to parameter of type 'unsigned int *' in setsockopt()

RESOLVED FIXED in 4.9.5

Status

NSPR
NSPR
P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jan Beich, Assigned: Wan-Teh Chang)

Tracking

(Blocks: 1 bug)

4.9.2
4.9.5
x86_64
FreeBSD

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

Comment hidden (empty)
(Reporter)

Comment 1

5 years ago
Created attachment 651910 [details] [diff] [review]
Darwin/FreeBSD use socklen_t

ptio.c:1155:26: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
                    &on, &optlen) == 0) {
                         ^~~~~~~
/usr/include/sys/socket.h:617:72: note: passing argument to parameter here
int     getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);
                                                                           ^
Attachment #651910 - Flags: review?(wtc)
(Reporter)

Updated

5 years ago
(Assignee)

Updated

5 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Target Milestone: --- → 4.9.5
(Assignee)

Comment 2

5 years ago
Comment on attachment 651910 [details] [diff] [review]
Darwin/FreeBSD use socklen_t

r=wtc. Thanks you for the patch. (I've had the same patch in
my source tree for a long time but never got around to
submitting it.) This patch was also submitted by Mikhail Teterin
in bug 527006 before.

Patch checked in on the NSPR trunk (NSPR 4.9.5).

Checking in ptio.c;
/cvsroot/mozilla/nsprpub/pr/src/pthreads/ptio.c,v  <--  ptio.c
new revision: 3.120; previous revision: 3.119
done
Attachment #651910 - Flags: review?(wtc) → review+
(Assignee)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.