- Kill oskittcp warnings. Somewhat hacky? Yes indeed.

svn path=/trunk/; revision=38304
This commit is contained in:
Stefan Ginsberg 2008-12-23 18:16:48 +00:00
parent 20cf8d2ace
commit 54bd4baacd
8 changed files with 23 additions and 15 deletions

View file

@ -98,10 +98,12 @@ struct name { \
struct type *slh_first; /* first element */ \ struct type *slh_first; /* first element */ \
} }
#if 0
#define SLIST_ENTRY(type) \ #define SLIST_ENTRY(type) \
struct { \ struct { \
struct type *sle_next; /* next element */ \ struct type *sle_next; /* next element */ \
} }
#endif
/* /*
* Singly-linked List functions. * Singly-linked List functions.

View file

@ -132,7 +132,7 @@ void printf __P((const char *, ...));
static __inline int bsd_log ( int blah, const char* fmt, ... ) static __inline int bsd_log ( int blah, const char* fmt, ... )
{ {
va_list arg; va_list arg;
int i; int i = 0;
va_start(arg, fmt); va_start(arg, fmt);
#ifndef __NTDRIVER__ #ifndef __NTDRIVER__
i = vprintf ( fmt, arg ); i = vprintf ( fmt, arg );
@ -238,10 +238,14 @@ struct execve_args {
char **envv; char **envv;
}; };
int execve __P((struct proc *, struct execve_args *, int *retval)); int execve __P((struct proc *, struct execve_args *, int *retval));
#if 0
struct fork_args { struct fork_args {
int dummy; int dummy;
}; };
int fork __P((struct proc *, struct fork_args *, int retval[])); int fork __P((struct proc *, struct fork_args *, int retval[]));
#endif
struct sync_args { struct sync_args {
int dummy; int dummy;
}; };

View file

@ -1,6 +1,8 @@
#ifndef _OSKITFREEBSD_H #ifndef _OSKITFREEBSD_H
#define _OSKITFREEBSD_H #define _OSKITFREEBSD_H
#undef PAGE_SIZE
#undef PAGE_SHIFT
#include <ntddk.h> #include <ntddk.h>
#ifdef linux #ifdef linux

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="oskittcp" type="staticlibrary" allowwarnings="true"> <module name="oskittcp" type="staticlibrary">
<define name="__NTDRIVER__"/> <define name="__NTDRIVER__"/>
<define name="KERNEL"/> <define name="KERNEL"/>
<define name="_DISABLE_TIDENTS"/> <define name="_DISABLE_TIDENTS"/>

View file

@ -102,7 +102,7 @@ in_pcbbind(inp, nam)
OS_DbgPrint(OSK_MID_TRACE,("Called\n")); 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__ #ifndef __REACTOS__
if (in_ifaddr == 0) { if (in_ifaddr == 0) {

View 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, ... ) { void *fbsd_malloc( unsigned int bytes, char *file, unsigned line, ... ) {
if( !OtcpEvent.TCPMalloc ) panic("no malloc"); if( !OtcpEvent.TCPMalloc ) panic("no malloc");
return OtcpEvent.TCPMalloc 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, ... ) { void fbsd_free( void *data, char *file, unsigned line, ... ) {
if( !OtcpEvent.TCPFree ) panic("no free"); if( !OtcpEvent.TCPFree ) panic("no free");
OtcpEvent.TCPFree( OtcpEvent.ClientData, data, file, line ); OtcpEvent.TCPFree( OtcpEvent.ClientData, data, (OSK_PCHAR)file, line );
} }
void InitOskitTCP() { void InitOskitTCP() {
@ -155,7 +155,7 @@ int OskitTCPRecv( void *connection,
uio.uio_rw = UIO_READ; uio.uio_rw = UIO_READ;
uio.uio_iovcnt = 1; uio.uio_iovcnt = 1;
iov.iov_len = Len; 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)); 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; struct iovec iov;
iov.iov_len = Len; iov.iov_len = Len;
iov.iov_base = Data; iov.iov_base = (char *)Data;
uio.uio_iov = &iov; uio.uio_iov = &iov;
uio.uio_iovcnt = 1; uio.uio_iovcnt = 1;
uio.uio_offset = 0; uio.uio_offset = 0;
@ -406,7 +406,7 @@ out:
void OskitTCPReceiveDatagram( OSK_PCHAR Data, OSK_UINT Len, void OskitTCPReceiveDatagram( OSK_PCHAR Data, OSK_UINT Len,
OSK_UINT IpHeaderLen ) { 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; struct ip *iph;
if( !Ip ) return; /* drop the segment */ if( !Ip ) return; /* drop the segment */

View file

@ -88,7 +88,7 @@ ip_output(m0, opt, ro, flags, imo)
#endif #endif
register struct mbuf *m = m0; register struct mbuf *m = m0;
register int hlen = sizeof (struct ip); 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 * It might seem obvious at first glance that one could easily
* make a one-behind cache out of this by simply making `iproute' * 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 route iproute;
struct sockaddr_in *dst; struct sockaddr_in *dst;
struct in_ifaddr *ia; struct in_ifaddr *ia = NULL;
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
if ((m->m_flags & M_PKTHDR) == 0) if ((m->m_flags & M_PKTHDR) == 0)
@ -380,7 +380,7 @@ sendit:
m_copydata( m, 0, htons(ip->ip_len), new_m->m_data ); m_copydata( m, 0, htons(ip->ip_len), new_m->m_data );
new_m->m_len = htons(ip->ip_len); new_m->m_len = htons(ip->ip_len);
error = OtcpEvent.PacketSend( OtcpEvent.ClientData, 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 ); m_free( new_m );
goto done; goto done;
} }
@ -520,7 +520,7 @@ sendorfree:
m_copydata( m, 0, htons(ip->ip_len), new_m->m_data ); m_copydata( m, 0, htons(ip->ip_len), new_m->m_data );
new_m->m_len = htons(ip->ip_len); new_m->m_len = htons(ip->ip_len);
error = OtcpEvent.PacketSend( OtcpEvent.ClientData, 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 ); m_free( new_m );
goto done; goto done;
} }

View file

@ -486,7 +486,7 @@ findpcb:
* else do it below (after getting remote address). * else do it below (after getting remote address).
*/ */
if (tp->t_state != TCPS_LISTEN) 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 * Header prediction: check for the two common cases
@ -687,7 +687,7 @@ findpcb:
taop = &tao_noncached; taop = &tao_noncached;
bzero(taop, sizeof(*taop)); bzero(taop, sizeof(*taop));
} }
tcp_dooptions(tp, optp, optlen, ti, &to); tcp_dooptions(tp, (u_char *)optp, optlen, ti, &to);
if (iss) if (iss)
tp->iss = iss; tp->iss = iss;
else else
@ -1974,7 +1974,7 @@ tcp_mss(tp, offer)
int offer; int offer;
{ {
register struct rtentry *rt; register struct rtentry *rt;
struct ifnet *ifp; struct ifnet *ifp = NULL;
register int rtt, mss; register int rtt, mss;
u_long bufsize; u_long bufsize;
struct inpcb *inp; struct inpcb *inp;