fix several more compiler warnings in VC

This commit is contained in:
mkendora
2003-09-01 01:40:56 +00:00
parent 726759b9c3
commit 88defd41b9
3 changed files with 36 additions and 16 deletions

View File

@@ -31,6 +31,8 @@ extern void ConvertJoyMap2(void);
extern void displayparams(void); extern void displayparams(void);
extern void makeextension(void); extern void makeextension(void);
int pccmdline(void);
extern unsigned char Palette0, SPC700sh, OffBy1Line, DSPDisable, extern unsigned char Palette0, SPC700sh, OffBy1Line, DSPDisable,
MMXSupport, Force8b, ForcePal, GUIClick, MouseDis, MMXSupport, Force8b, ForcePal, GUIClick, MouseDis,
MusicRelVol, ScreenScale, SoundCompD, SoundQuality, MusicRelVol, ScreenScale, SoundCompD, SoundQuality,
@@ -69,13 +71,14 @@ char ucase(char ch){
} }
extern HINSTANCE hInst; extern HINSTANCE hInst;
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{ {
int longueur; int longueur;
char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR]; char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR];
char fname2[_MAX_FNAME],ext[_MAX_EXT], File[_MAX_PATH]; char fname2[_MAX_FNAME],ext[_MAX_EXT], File[_MAX_PATH];
DWORD dwRead; //MK: Unused 2003/08/31
//DWORD dwRead;
char * strp; char * strp;

View File

@@ -147,6 +147,7 @@ char hostname[50] = "IP N/A";
int SendData(int dsize,unsigned char *dptr); int SendData(int dsize,unsigned char *dptr);
int GetData(int dsize,unsigned char *dptr); int GetData(int dsize,unsigned char *dptr);
int GetLeftUDP(void);
/**********************************************************\ /**********************************************************\
* Initialize the zsnes tcpip module * * Initialize the zsnes tcpip module *
@@ -158,8 +159,8 @@ int GetData(int dsize,unsigned char *dptr);
int InitTCP() int InitTCP()
{ {
//MK:unused 2003/08/31
char blah[255]; //char blah[255];
WORD versionneeded = MAKEWORD(2,2); WORD versionneeded = MAKEWORD(2,2);
WSADATA wsadata; WSADATA wsadata;
@@ -233,7 +234,8 @@ void GetUDPStatus() {
int isipval(char *name){ int isipval(char *name){
int i; int i;
int tcperr; //MK:unused 2003/08/31
//int tcperr;
i=0; i=0;
while(name[i]!=0){ while(name[i]!=0){
if (!((name[i]=='.') || ((name[i]>='0') && (name[i]<='9')))) if (!((name[i]=='.') || ((name[i]>='0') && (name[i]<='9'))))
@@ -248,9 +250,11 @@ int ConnectServer(char *servername, unsigned int port)
char blah[255]; char blah[255];
int retval,i; int retval,i;
LPHOSTENT host1; LPHOSTENT host1;
unsigned long addr1; //MK:unused 2003/08/31
//unsigned long addr1;
int yesip; int yesip;
WSADATA wsadata; //MK:unused 2003/08/31
//WSADATA wsadata;
packetnum = 0; packetnum = 0;
packetnumhead = 0; packetnumhead = 0;
@@ -440,8 +444,9 @@ void Disconnect()
int StartServerCycle(unsigned short port) int StartServerCycle(unsigned short port)
{ {
int retval,sizet,i; int retval,i;
//MK:unused 2003/08/31
//int sizet;
portval = port; portval = port;
packetnum = 0; packetnum = 0;
packetnumhead = 0; packetnumhead = 0;
@@ -555,9 +560,12 @@ int StartServerCycle(unsigned short port)
int acceptzuser() int acceptzuser()
{ {
int retval,r,i; //MK:unused 2003/08/31
LPHOSTENT host1; //int retval;
int yesip; //int r,i;
//LPHOSTENT host1;
//int yesip;
//MK: unused end
if (UDPEnable) if (UDPEnable)
{ {
@@ -813,7 +821,8 @@ extern void UpdateVFrame(void);
int SendData(int dsize,unsigned char *dptr) int SendData(int dsize,unsigned char *dptr)
{ {
int retval; int retval;
char message1[256]; //MK: unused 2003/08/31
//char message1[256];
if (UDPEnable){ if (UDPEnable){
/* retval = sendto(ugamesocket,dptr,dsize,0,(struct sockaddr *)&ugameaddress,sizeof(ugameaddress)); /* retval = sendto(ugamesocket,dptr,dsize,0,(struct sockaddr *)&ugameaddress,sizeof(ugameaddress));
@@ -1032,7 +1041,8 @@ int GetLeftUDP()
FD_SET zrf; FD_SET zrf;
struct timeval nto; struct timeval nto;
int r; int r;
int tempsize; //MK: unused 2003/08/31
//int tempsize;
nto.tv_sec=0; nto.tv_sec=0;
nto.tv_usec=0; /* return immediately */ nto.tv_usec=0; /* return immediately */

View File

@@ -27,6 +27,11 @@
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#ifdef __WIN32__
#include <direct.h>
#include <sys/utime.h>
#endif
#ifdef __MSDOS__ #ifdef __MSDOS__
#include <utime.h> #include <utime.h>
#include <sys/stat.h> #include <sys/stat.h>
@@ -48,12 +53,14 @@ unsigned int ZipError=0;
#ifndef __LINUX__ #ifndef __LINUX__
#ifndef __MSDOS__ #ifndef __MSDOS__
#ifndef __WIN32__
struct utimbuf { struct utimbuf {
time_t actime; time_t actime;
time_t modtime; time_t modtime;
}; };
#endif #endif
#endif #endif
#endif
void change_file_date(const char *filename,uLong dosdate,tm_unz tmu_date) void change_file_date(const char *filename,uLong dosdate,tm_unz tmu_date)
{ {
@@ -310,10 +317,10 @@ int do_extract(unzFile uf,int opt_extract_without_path,int opt_overwrite)
void extractzip(char *FileToExtract) void extractzip(char *FileToExtract)
{ {
unzFile uf=NULL; unzFile uf=NULL;
// I really don't like hardcoding these sizes...
char oldpath[128];
#ifdef __LINUX__ #ifdef __LINUX__
// I really don't like hardcoding these sizes...
char oldpath[128];
extern char InitDir; extern char InitDir;
getcwd(oldpath, 128); getcwd(oldpath, 128);