Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Nov 2006 01:19:00 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Randall Stewart <rrs@cisco.com>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/netinet sctp_asconf.c
Message-ID:  <20061103221900.GC1845@rambler-co.ru>
In-Reply-To: <454BB5DC.4030903@cisco.com>
References:  <200611031948.kA3JmuZ6072620@repoman.freebsd.org> <454BAEF0.6050807@FreeBSD.org> <454BB06E.40202@cisco.com> <454BB5DC.4030903@cisco.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--bKyqfOwhbdpXa4YI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 03, 2006 at 04:34:20PM -0500, Randall Stewart wrote:
> Ok I just went and looked at these..
>=20
> I fixed easily:
>=20
> /src/sys/netinet/sctp_usrreq.c: In function `sctp_disconnect':
> /src/sys/netinet/sctp_usrreq.c:1138: warning: cast from pointer to=20
> 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=20
> integer of different size
>=20
> 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...
>=20
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=20
> integer of different size
>=20
>=20
> 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 =3D (mtod(m, int));
>=20
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 =3D *(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):
>=20
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=20
> redeclaration of 'sctp_peeloff'
> /src/sys/sys/sysproto.h:1813: warning: previous declaration of=20
> 'sctp_peeloff' was here
> /src/sys/compat/freebsd32/freebsd32_proto.h:397: warning: redundant=20
> redeclaration of 'sctp_generic_sendmsg'
> /src/sys/sys/sysproto.h:1814: warning: previous declaration of=20
> 'sctp_generic_sendmsg' was here
> /src/sys/compat/freebsd32/freebsd32_proto.h:398: warning: redundant=20
> redeclaration of 'sctp_generic_sendmsg_iov'
> /src/sys/sys/sysproto.h:1815: warning: previous declaration of=20
> 'sctp_generic_sendmsg_iov' was here
> /src/sys/compat/freebsd32/freebsd32_proto.h:399: warning: redundant=20
> redeclaration of 'sctp_generic_recvmsg'
> /src/sys/sys/sysproto.h:1816: warning: previous declaration of=20
> 'sctp_generic_recvmsg' was here
> *** Error code 1
>=20
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?
>=20
> Are they supposed to be renamed differntly in some way??
>=20
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,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--bKyqfOwhbdpXa4YI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFS8BUqRfpzJluFF4RAg1tAJwIc4QpDP8wQLq3lh0Lr7Htb4mO1wCZAWtC
Sh0/Q1iSrCIHYbG2ZhJsMPg=
=VxUF
-----END PGP SIGNATURE-----

--bKyqfOwhbdpXa4YI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061103221900.GC1845>