Fix a lot of MinGW/GCC warnings
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6168 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
e918dd8a27
commit
cf4e5cf132
31 changed files with 92 additions and 87 deletions
|
@ -62,7 +62,7 @@ int g_compressor_solid;
|
|||
int g_mui;
|
||||
int g_zipfile_size;
|
||||
|
||||
TCHAR *g_options=_T("");//_T("/V3");
|
||||
const TCHAR *g_options=_T("");//_T("/V3");
|
||||
|
||||
static BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
@ -324,12 +324,12 @@ int tempzip_make(HWND hwndDlg, TCHAR *fn)
|
|||
return 0;
|
||||
}
|
||||
|
||||
TCHAR *gp_winamp = _T("(WINAMP DIRECTORY)");
|
||||
TCHAR *gp_winamp_plugins = _T("(WINAMP PLUG-INS DIRECTORY)");
|
||||
TCHAR *gp_winamp_vis = _T("(WINAMP VIS PLUG-INS DIRECTORY)");
|
||||
TCHAR *gp_winamp_dsp = _T("(WINAMP DSP PLUG-INS DIRECTORY)");
|
||||
TCHAR *gp_winamp_skins = _T("(WINAMP SKINS DIRECTORY)");
|
||||
TCHAR *gp_poi = _T("(PATH OF INSTALLER)");
|
||||
const TCHAR *gp_winamp = _T("(WINAMP DIRECTORY)");
|
||||
const TCHAR *gp_winamp_plugins = _T("(WINAMP PLUG-INS DIRECTORY)");
|
||||
const TCHAR *gp_winamp_vis = _T("(WINAMP VIS PLUG-INS DIRECTORY)");
|
||||
const TCHAR *gp_winamp_dsp = _T("(WINAMP DSP PLUG-INS DIRECTORY)");
|
||||
const TCHAR *gp_winamp_skins = _T("(WINAMP SKINS DIRECTORY)");
|
||||
const TCHAR *gp_poi = _T("(PATH OF INSTALLER)");
|
||||
|
||||
|
||||
void wnd_printf(const TCHAR *str)
|
||||
|
@ -366,7 +366,7 @@ void wnd_printf(const TCHAR *str)
|
|||
|
||||
}
|
||||
|
||||
void ErrorMessage(TCHAR *str) //display detailed error info
|
||||
void ErrorMessage(const TCHAR *str) //display detailed error info
|
||||
{
|
||||
LPVOID msg;
|
||||
FormatMessage(
|
||||
|
@ -513,7 +513,7 @@ void makeEXE(HWND hwndDlg)
|
|||
_ftprintf(fp,_T("!define ZIP2EXE_COMPRESSOR_SOLID\n"));
|
||||
GetDlgItemText(hwndDlg,IDC_INSTPATH,buf,sizeof(buf));
|
||||
int iswinamp=0;
|
||||
TCHAR *iswinampmode=NULL;
|
||||
LPCTSTR iswinampmode=NULL;
|
||||
if (!_tcscmp(buf,gp_poi)) lstrcpy(buf,_T("$EXEDIR"));
|
||||
|
||||
if (!_tcscmp(buf,gp_winamp))
|
||||
|
|
|
@ -611,10 +611,12 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
|
|||
|
||||
/* we check the magic */
|
||||
if (err==UNZ_OK)
|
||||
{
|
||||
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
else if (uMagic!=0x02014b50)
|
||||
err=UNZ_BADZIPFILE;
|
||||
}
|
||||
|
||||
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
|
@ -691,10 +693,12 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
|
|||
uSizeRead = extraFieldBufferSize;
|
||||
|
||||
if (lSeek!=0)
|
||||
{
|
||||
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
else
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
|
||||
if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
|
||||
err=UNZ_ERRNO;
|
||||
|
@ -716,10 +720,12 @@ local int unzlocal_GetCurrentFileInfoInternal (file,
|
|||
uSizeRead = commentBufferSize;
|
||||
|
||||
if (lSeek!=0)
|
||||
{
|
||||
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
else
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
|
||||
if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
|
||||
err=UNZ_ERRNO;
|
||||
|
@ -980,11 +986,12 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
|
|||
|
||||
|
||||
if (err==UNZ_OK)
|
||||
{
|
||||
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
else if (uMagic!=0x04034b50)
|
||||
err=UNZ_BADZIPFILE;
|
||||
|
||||
}
|
||||
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
/*
|
||||
|
@ -1537,7 +1544,7 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
|
|||
char *szComment;
|
||||
uLong uSizeBuf;
|
||||
{
|
||||
int err=UNZ_OK;
|
||||
// int err=UNZ_OK;
|
||||
unz_s* s;
|
||||
uLong uReadThis ;
|
||||
if (file==NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue