mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-06-12 01:29:28 +00:00
Minor changes in Win32 port: fix some warnings
This commit is contained in:
parent
823c4df3a2
commit
52c5f3bf38
|
@ -38,6 +38,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
/** @todo fix some warnings */
|
||||
#pragma warning (disable: 4127)
|
||||
#pragma warning (disable: 4244)
|
||||
#pragma warning (disable: 4996)
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile="$(IntDir)/$(TargetName).pch"
|
||||
ProgramDataBaseFileName="$(IntDir)/$(ProjectName).pdb"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
StructMemberAlignment="1"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)/$(ProjectName).pdb"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
StructMemberAlignment="1"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)/$(ProjectName).pdb"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __PKTIF_H__
|
||||
|
||||
#include "lwip/err.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
err_t ethernetif_init (struct netif *netif);
|
||||
void ethernetif_shutdown(struct netif *netif);
|
||||
|
|
|
@ -60,7 +60,7 @@ static int sio_abort=0;
|
|||
sio_fd_t sio_open(u8_t devnum)
|
||||
{ HANDLE hPipe = INVALID_HANDLE_VALUE;
|
||||
CHAR szPipeName[256];
|
||||
printf("sio_open(%lu)\n", (DWORD)devnum);
|
||||
LWIP_DEBUGF( SIO_DEBUG, ("sio_open(%lu)\n", (DWORD)devnum));
|
||||
sprintf( szPipeName, "\\\\.\\pipe\\lwip%lu", (DWORD)(devnum));
|
||||
hPipe = CreateFile(szPipeName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hPipe != INVALID_HANDLE_VALUE) {
|
||||
|
@ -90,7 +90,7 @@ void sio_send(u8_t num, sio_fd_t psio)
|
|||
*/
|
||||
u8_t sio_recv(sio_fd_t psio)
|
||||
{ DWORD dwNbBytesReadden = 0;
|
||||
u8_t byte;
|
||||
u8_t byte = 0;
|
||||
LWIP_DEBUGF( SIO_DEBUG, ("sio_recv()\n"));
|
||||
while ((sio_abort==0) && ((!ReadFile( (HANDLE)(psio), &byte, 1, &dwNbBytesReadden, NULL)) || (dwNbBytesReadden<1)));
|
||||
LWIP_DEBUGF( SIO_DEBUG, ("sio_recv()=%lu\n", (DWORD)byte));
|
||||
|
@ -114,7 +114,8 @@ u32_t sio_write(sio_fd_t psio, u8_t * data, u32_t len)
|
|||
}
|
||||
|
||||
void sio_read_abort(sio_fd_t psio)
|
||||
{ LWIP_DEBUGF( SIO_DEBUG, ("sio_read_abort() !!!!!...\n"));
|
||||
{ LWIP_UNUSED_ARG(psio);
|
||||
LWIP_DEBUGF( SIO_DEBUG, ("sio_read_abort() !!!!!...\n"));
|
||||
sio_abort=1;
|
||||
return;
|
||||
}
|
||||
|
@ -122,8 +123,10 @@ void sio_read_abort(sio_fd_t psio)
|
|||
void ppp_trace( int level, const char *format, ...)
|
||||
{ int len;
|
||||
char buffer[1024];
|
||||
|
||||
va_list argList;
|
||||
|
||||
LWIP_UNUSED_ARG(level);
|
||||
|
||||
va_start ( argList, format);
|
||||
len=vsprintf( buffer, format, argList);
|
||||
buffer[len-1]='\0';
|
||||
|
@ -133,8 +136,10 @@ void ppp_trace( int level, const char *format, ...)
|
|||
|
||||
int snprintf( char *buffer, size_t count, const char *format, ...)
|
||||
{ int len;
|
||||
|
||||
va_list argList;
|
||||
|
||||
LWIP_UNUSED_ARG(count);
|
||||
|
||||
va_start ( argList, format);
|
||||
len=vsprintf( buffer, format, argList);
|
||||
buffer[len-1]='\0';
|
||||
|
|
|
@ -318,6 +318,7 @@ msvc_netif_init()
|
|||
|
||||
void dns_found(const char *name, struct ip_addr *addr, void *arg)
|
||||
{
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
printf("%s: %s\n", name, addr?inet_ntoa(*(struct in_addr*)addr):"<not found>");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user