C warning that I can't seem to track down
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Aug 8 16:50:41 UTC 2006
On Tue, Aug 08, 2006 at 09:30:07AM -0400, bob wrote:
> In newer versions of the GCC compiler the block of C code:
>
> int length;
You didn't specify, so perhaps it is a signed int.
> ...
>
> if(getsockname(s, (struct sockaddr *)&sin, &length))
>
> gives a warning below
>
> socketUtils.c:259: warning: pointer targets in passing argument 3 of
> 'getsockname' differ in signedness
>
>
> I tracked it down to a define called "socklen_t". Damned if I can find
> where that is defined.
>
> Any help would be appreciated. Thanks.
socklen_t is defined as an unsigned 32 bit value. Try making your int
unsigned as well.
--
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list