Warning cleanups.
- #define log to something else that isn't a gcc intrinsic
- Move some definitions around in the bsd headers so that proper order
is
maintained between selinfo and socket and functions that take these as
arguments.
- Miscellaneous casts.
Modified:
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/select.h
Modified:
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/socketvar
.h
Modified:
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h
Modified: trunk/reactos/drivers/lib/oskittcp/oskittcp/in_pcb.c
Modified: trunk/reactos/drivers/lib/oskittcp/oskittcp/interface.c
Modified: trunk/reactos/drivers/lib/oskittcp/oskittcp/route.c
_____
Modified:
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/select.h
---
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/select.h
2005-03-04 01:47:01 UTC (rev 13810)
+++
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/select.h
2005-03-04 02:09:43 UTC (rev 13811)
@@ -40,19 +40,14 @@
struct listener_mgr;
#endif
-/*
- * Used to maintain information about processes that wish to be
- * notified when I/O becomes possible.
- */
-struct selinfo {
-#if defined(OSKIT)
- struct listener_mgr *si_sel;
-#endif /* OSKIT */
- pid_t si_pid; /* process to be notified */
- short si_flags; /* see below */
-};
-#define SI_COLL 0x0001 /* collision occurred */
+/* Included to suppress warnings about struct socket being declared in
the
+ * parameter list. Selinfo reoredered with struct socket. */
+struct selinfo;
+struct socket;
+
+#include <sys/socketvar.h>
+
#ifdef KERNEL
struct proc;
_____
Modified:
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/socketvar
.h
---
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/socketvar
.h 2005-03-04 01:47:01 UTC (rev 13810)
+++
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/socketvar
.h 2005-03-04 02:09:43 UTC (rev 13811)
@@ -40,7 +40,26 @@
#include <sys/filedesc.h> /* for struct filedesc */
#include <sys/select.h> /* for struct selinfo */
+/* Warning suppression */
+struct sockaddr;
+
/*
+ * Used to maintain information about processes that wish to be
+ * notified when I/O becomes possible.
+ *
+ * Moved from sys/select.h and replaced with an #include.
+ */
+struct selinfo {
+#if defined(OSKIT)
+ struct listener_mgr *si_sel;
+#endif /* OSKIT */
+ pid_t si_pid; /* process to be notified */
+ short si_flags; /* see below */
+};
+#define SI_COLL 0x0001 /* collision occurred */
+
+
+/*
* Kernel structure per socket.
* Contains send and receive buffer queues,
* handle on protocol and pointer to protocol
_____
Modified:
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h
---
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h
2005-03-04 01:47:01 UTC (rev 13810)
+++
trunk/reactos/drivers/lib/oskittcp/include/freebsd/src/sys/sys/systm.h
2005-03-04 02:09:43 UTC (rev 13811)
@@ -125,16 +125,16 @@
#include <oskitfreebsd.h>
#include <oskitdebug.h>
+
int __cdecl vprintf(const char *, va_list);
-static inline int log ( int blah, const char* fmt, ... )
+#define log bsd_log
+static inline int bsd_log ( int blah, const char* fmt, ... )
{
va_list arg;
int i;
va_start(arg, fmt);
-#ifndef __NTDRIVER__
i = vprintf ( fmt, arg );
-#endif
va_end(arg);
return i;
}
_____
Modified: trunk/reactos/drivers/lib/oskittcp/oskittcp/in_pcb.c
--- trunk/reactos/drivers/lib/oskittcp/oskittcp/in_pcb.c
2005-03-04 01:47:01 UTC (rev 13810)
+++ trunk/reactos/drivers/lib/oskittcp/oskittcp/in_pcb.c
2005-03-04 02:09:43 UTC (rev 13811)
@@ -312,7 +312,7 @@
* Don't do pcblookup call here; return interface in plocal_sin
* and exit to caller, that will do the lookup.
*/
- *plocal_sin = ia->ia_ifa.ifa_addr;
+ *plocal_sin = (struct sockaddr_in *)ia->ia_ifa.ifa_addr;
OS_DbgPrint(OSK_MID_TRACE,("plocal sin %x\n",
(*plocal_sin)->sin_addr.s_addr));
_____
Modified: trunk/reactos/drivers/lib/oskittcp/oskittcp/interface.c
--- trunk/reactos/drivers/lib/oskittcp/oskittcp/interface.c
2005-03-04 01:47:01 UTC (rev 13810)
+++ trunk/reactos/drivers/lib/oskittcp/oskittcp/interface.c
2005-03-04 02:09:43 UTC (rev 13811)
@@ -365,7 +365,7 @@
*/
so = head->so_q;
- inp = so ? so->so_pcb : 0;
+ inp = so ? (struct inpcb *)so->so_pcb : NULL;
if( inp ) {
((struct sockaddr_in *)AddrOut)->sin_addr.s_addr =
inp->inp_faddr.s_addr;
@@ -381,7 +381,7 @@
/*so->so_state &= ~SS_COMP;*/
- mnam.m_data = &sa;
+ mnam.m_data = (char *)&sa;
mnam.m_len = sizeof(sa);
(void) soaccept(so, &mnam);
@@ -452,7 +452,7 @@
OSK_UINT RemoteAddress,
OSK_UI16 RemotePort ) {
struct socket *so = socket;
- struct inpcb *inp = so->so_pcb;
+ struct inpcb *inp = (struct inpcb *)so->so_pcb;
inp->inp_laddr.s_addr = LocalAddress;
inp->inp_lport = LocalPort;
inp->inp_faddr.s_addr = RemoteAddress;
@@ -465,7 +465,7 @@
OSK_UINT *RemoteAddress,
OSK_UI16 *RemotePort ) {
struct socket *so = socket;
- struct inpcb *inp = so ? so->so_pcb : 0;
+ struct inpcb *inp = so ? (struct inpcb *)so->so_pcb : NULL;
if( inp ) {
*LocalAddress = inp->inp_laddr.s_addr;
*LocalPort = inp->inp_lport;
@@ -589,7 +589,7 @@
if( ifaddr )
{
- sin = (struct sockaddr *)&ifaddr->ifa_addr;
+ sin = (struct sockaddr_in *)&ifaddr->ifa_addr;
OS_DbgPrint(OSK_MID_TRACE,("ifaddr->addr = %x\n",
sin->sin_addr.s_addr));
_____
Modified: trunk/reactos/drivers/lib/oskittcp/oskittcp/route.c
--- trunk/reactos/drivers/lib/oskittcp/oskittcp/route.c 2005-03-04
01:47:01 UTC (rev 13810)
+++ trunk/reactos/drivers/lib/oskittcp/oskittcp/route.c 2005-03-04
02:09:43 UTC (rev 13811)
@@ -314,8 +314,8 @@
register struct ifaddr *ifa;
OS_DbgPrint(OSK_MID_TRACE,("Called: flags %\n", flags));
- OskitDumpBuffer( dst, sizeof(*dst) );
- OskitDumpBuffer( gateway, sizeof(*gateway) );
+ OskitDumpBuffer( (void *)dst, sizeof(*dst) );
+ OskitDumpBuffer( (void *)gateway, sizeof(*gateway) );
if ((flags & RTF_GATEWAY) == 0) {
/*
Show replies by date