cvs commit: src/sys/netinet sctp_asconf.c

Ruslan Ermilov ru at FreeBSD.org
Fri Nov 3 22:19:58 UTC 2006


On Fri, Nov 03, 2006 at 04:34:20PM -0500, Randall Stewart wrote:
> Ok I just went and looked at these..
> 
> I fixed easily:
> 
> /src/sys/netinet/sctp_usrreq.c: In function `sctp_disconnect':
> /src/sys/netinet/sctp_usrreq.c:1138: warning: cast from pointer to 
> integer of different size
> /src/sys/netinet/sctp_usrreq.c: In function `sctp_shutdown':
> /src/sys/netinet/sctp_usrreq.c:1279: warning: cast from pointer to 
> integer of different size
> 
> The above two are just a silly printf.. and casting a pointer
> to a (u_int)... ok.. no need for the pointer print anyway.. so
> I can remove it easily...
> 
Pointers should be printed with %p.

> /src/sys/netinet/sctp_usrreq.c: In function `sctp_optsset':
> /src/sys/netinet/sctp_usrreq.c:3136: warning: cast from pointer to 
> integer of different size
> 
> 
> The above one I will have to ask if any one of you can give
> me a hand.. I am not a sparcy person ;-) and the line is:
> 			on_off = (mtod(m, int));
> 
mtod() returns a pointer to a data area casted to some type;
in this case you probably want it casted to an "int *" and
extracted, i.e. "on_off = *(mtod(m, int *))".

> Now the other set of errors on amd (yet another platform I don't have
>  ahh if only I could buy more toys :-0):
> 
You don't need to have it physically to at least test compile;
"make universe" is there to test all of them.

> /src/sys/compat/freebsd32/freebsd32_proto.h:396: warning: redundant 
> redeclaration of 'sctp_peeloff'
> /src/sys/sys/sysproto.h:1813: warning: previous declaration of 
> 'sctp_peeloff' was here
> /src/sys/compat/freebsd32/freebsd32_proto.h:397: warning: redundant 
> redeclaration of 'sctp_generic_sendmsg'
> /src/sys/sys/sysproto.h:1814: warning: previous declaration of 
> 'sctp_generic_sendmsg' was here
> /src/sys/compat/freebsd32/freebsd32_proto.h:398: warning: redundant 
> redeclaration of 'sctp_generic_sendmsg_iov'
> /src/sys/sys/sysproto.h:1815: warning: previous declaration of 
> 'sctp_generic_sendmsg_iov' was here
> /src/sys/compat/freebsd32/freebsd32_proto.h:399: warning: redundant 
> redeclaration of 'sctp_generic_recvmsg'
> /src/sys/sys/sysproto.h:1816: warning: previous declaration of 
> 'sctp_generic_recvmsg' was here
> *** Error code 1
> 
This one I've already fixed.

> Since I don't understand the compat stuff... and for that matter
> this is the first time I have ever copied them in there (for the
> commit as it said to do in kern/syscalls.master)... Is there some
> thing special I am supposed to do when I put these critters in here?
> 
> Are they supposed to be renamed differntly in some way??
> 
They're not supposed to be redeclared.  I haven't looked if what
you have in compat32/syscalls.master will work, but it's at least
clear now that it hasn't been tested.  To test it, you'd set up
an amd64 box with SCTP and try to run a 32-bit application that
calls these syscalls, and make sure they work.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20061103/a1d68ac0/attachment.pgp


More information about the cvs-all mailing list