- Kill oskittcp warnings. Somewhat hacky? Yes indeed.
authorStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 23 Dec 2008 18:16:48 +0000 (18:16 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 23 Dec 2008 18:16:48 +0000 (18:16 +0000)
svn path=/trunk/; revision=38304

reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/queue.h
reactos/lib/drivers/oskittcp/include/freebsd/src/sys/sys/systm.h
reactos/lib/drivers/oskittcp/include/oskitfreebsd.h
reactos/lib/drivers/oskittcp/oskittcp.rbuild
reactos/lib/drivers/oskittcp/oskittcp/in_pcb.c
reactos/lib/drivers/oskittcp/oskittcp/interface.c
reactos/lib/drivers/oskittcp/oskittcp/ip_output.c
reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c

index 24c85e8..aee0bc5 100644 (file)
@@ -98,10 +98,12 @@ struct name {                                                               \
        struct type *slh_first; /* first element */                     \
 }
 
+#if 0
 #define SLIST_ENTRY(type)                                              \
 struct {                                                               \
        struct type *sle_next;  /* next element */                      \
 }
+#endif
 
 /*
  * Singly-linked List functions.
index 1e6a817..98b73e4 100644 (file)
@@ -132,7 +132,7 @@ void        printf __P((const char *, ...));
 static __inline int bsd_log ( int blah, const char* fmt, ... )
 {
        va_list arg;
-       int i;
+       int i = 0;
        va_start(arg, fmt);
 #ifndef __NTDRIVER__
        i = vprintf ( fmt, arg );
@@ -238,10 +238,14 @@ struct execve_args {
        char    **envv;
 };
 int    execve __P((struct proc *, struct execve_args *, int *retval));
+
+#if 0
 struct fork_args {
        int     dummy;
 };
 int    fork __P((struct proc *, struct fork_args *, int retval[]));
+#endif
+
 struct sync_args {
        int     dummy;
 };
index f3bad2a..499efa5 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _OSKITFREEBSD_H
 #define _OSKITFREEBSD_H
 
+#undef PAGE_SIZE
+#undef PAGE_SHIFT
 #include <ntddk.h>
 
 #ifdef linux
index 786019d..35bdebd 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="oskittcp" type="staticlibrary" allowwarnings="true">
+<module name="oskittcp" type="staticlibrary">
        <define name="__NTDRIVER__"/>
        <define name="KERNEL"/>
        <define name="_DISABLE_TIDENTS"/>
index cb66bd2..d90a964 100644 (file)
@@ -102,7 +102,7 @@ in_pcbbind(inp, nam)
 
        OS_DbgPrint(OSK_MID_TRACE,("Called\n"));
 
-       if( nam ) OskitDumpBuffer( nam->m_data, nam->m_len );
+       if( nam ) OskitDumpBuffer((OSK_PCHAR)nam->m_data, nam->m_len );
 
 #ifndef __REACTOS__
        if (in_ifaddr == 0) {
index fb44beb..33b2d93 100644 (file)
@@ -35,12 +35,12 @@ int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
 void *fbsd_malloc( unsigned int bytes, char *file, unsigned line, ... ) {
     if( !OtcpEvent.TCPMalloc ) panic("no malloc");
     return OtcpEvent.TCPMalloc
-       ( OtcpEvent.ClientData, (OSK_UINT)bytes, file, line );
+       ( OtcpEvent.ClientData, (OSK_UINT)bytes, (OSK_PCHAR)file, line );
 }
 
 void fbsd_free( void *data, char *file, unsigned line, ... ) {
     if( !OtcpEvent.TCPFree ) panic("no free");
-    OtcpEvent.TCPFree( OtcpEvent.ClientData, data, file, line );
+    OtcpEvent.TCPFree( OtcpEvent.ClientData, data, (OSK_PCHAR)file, line );
 }
 
 void InitOskitTCP() {
@@ -155,7 +155,7 @@ int OskitTCPRecv( void *connection,
     uio.uio_rw = UIO_READ;
     uio.uio_iovcnt = 1;
     iov.iov_len = Len;
-    iov.iov_base = Data;
+    iov.iov_base = (char *)Data;
 
     OS_DbgPrint(OSK_MID_TRACE,("Reading %d bytes from TCP:\n", Len));
 
@@ -260,7 +260,7 @@ int OskitTCPSend( void *socket, OSK_PCHAR Data, OSK_UINT Len,
     struct iovec iov;
 
     iov.iov_len = Len;
-    iov.iov_base = Data;
+    iov.iov_base = (char *)Data;
     uio.uio_iov = &iov;
     uio.uio_iovcnt = 1;
     uio.uio_offset = 0;
@@ -406,7 +406,7 @@ out:
 
 void OskitTCPReceiveDatagram( OSK_PCHAR Data, OSK_UINT Len,
                              OSK_UINT IpHeaderLen ) {
-    struct mbuf *Ip = m_devget( Data, Len, 0, NULL, NULL );
+    struct mbuf *Ip = m_devget( (char *)Data, Len, 0, NULL, NULL );
     struct ip *iph;
 
     if( !Ip ) return; /* drop the segment */
index a43def5..709b6b1 100644 (file)
@@ -88,7 +88,7 @@ ip_output(m0, opt, ro, flags, imo)
 #endif
        register struct mbuf *m = m0;
        register int hlen = sizeof (struct ip);
-       int len, off, error = 0;
+       int len = 0, off, error = 0;
        /*
         * It might seem obvious at first glance that one could easily
         * make a one-behind cache out of this by simply making `iproute'
@@ -108,7 +108,7 @@ ip_output(m0, opt, ro, flags, imo)
         */
        struct route iproute;
        struct sockaddr_in *dst;
-       struct in_ifaddr *ia;
+       struct in_ifaddr *ia = NULL;
 
 #ifdef DIAGNOSTIC
        if ((m->m_flags & M_PKTHDR) == 0)
@@ -380,7 +380,7 @@ sendit:
                m_copydata( m, 0, htons(ip->ip_len), new_m->m_data );
                new_m->m_len = htons(ip->ip_len);
                error = OtcpEvent.PacketSend( OtcpEvent.ClientData,
-                                             new_m->m_data, new_m->m_len );
+                                             (OSK_PCHAR)new_m->m_data, new_m->m_len );
                m_free( new_m );
                goto done;
            }
@@ -520,7 +520,7 @@ sendorfree:
            m_copydata( m, 0, htons(ip->ip_len), new_m->m_data );
            new_m->m_len = htons(ip->ip_len);
            error = OtcpEvent.PacketSend( OtcpEvent.ClientData,
-                                         new_m->m_data, new_m->m_len );
+                                         (OSK_PCHAR)new_m->m_data, new_m->m_len );
            m_free( new_m );
            goto done;
        }
index f796f8a..248b8bc 100644 (file)
@@ -486,7 +486,7 @@ findpcb:
         * else do it below (after getting remote address).
         */
        if (tp->t_state != TCPS_LISTEN)
-               tcp_dooptions(tp, optp, optlen, ti, &to);
+               tcp_dooptions(tp, (u_char *)optp, optlen, ti, &to);
 
        /*
         * Header prediction: check for the two common cases
@@ -687,7 +687,7 @@ findpcb:
                        taop = &tao_noncached;
                        bzero(taop, sizeof(*taop));
                }
-               tcp_dooptions(tp, optp, optlen, ti, &to);
+               tcp_dooptions(tp, (u_char *)optp, optlen, ti, &to);
                if (iss)
                        tp->iss = iss;
                else
@@ -1974,7 +1974,7 @@ tcp_mss(tp, offer)
        int offer;
 {
        register struct rtentry *rt;
-       struct ifnet *ifp;
+       struct ifnet *ifp = NULL;
        register int rtt, mss;
        u_long bufsize;
        struct inpcb *inp;