Closed Bug 782815 Opened 12 years ago Closed 12 years ago

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

Categories

(NSPR :: NSPR, defect, P2)

4.9.2
x86_64
FreeBSD
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jbeich, Assigned: wtc)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

      No description provided.
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)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Target Milestone: --- → 4.9.5
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+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: