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
|
@ -3653,7 +3653,7 @@ int CEXEBuild::set_compressor(const tstring& compressor, const bool solid) {
|
|||
tstring CEXEBuild::get_stub_variant_suffix()
|
||||
{
|
||||
LONG variant = 0;
|
||||
for (int index = 0; index < COUNTOF(available_stub_variants); index++)
|
||||
for (unsigned int index = 0; index < COUNTOF(available_stub_variants); index++)
|
||||
{
|
||||
if (target_minimal_OS >= available_stub_variants[index])
|
||||
variant = available_stub_variants[index];
|
||||
|
|
|
@ -1211,7 +1211,9 @@ int NSISCALL TreeGetSelectedSection(HWND tree, BOOL mouse)
|
|||
ht.pt.y = GET_Y_LPARAM(dwpos);
|
||||
ScreenToClient(tree, &ht.pt);
|
||||
|
||||
TreeView_HitTest(tree, &ht);
|
||||
{
|
||||
const HTREEITEM UNUSED hDummy1 = TreeView_HitTest(tree, &ht);
|
||||
}
|
||||
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
|
||||
if (!(ht.flags & TVHT_ONITEMSTATEICON))
|
||||
|
@ -1293,7 +1295,9 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
hImageList = ImageList_Create(16,16, ILC_COLOR32|ILC_MASK, 6, 0);
|
||||
ImageList_AddMasked(hImageList,hBMcheck1,RGB(255,0,255));
|
||||
|
||||
TreeView_SetImageList(hwndTree1, hImageList, TVSIL_STATE);
|
||||
{
|
||||
const HIMAGELIST UNUSED hDummy1 = TreeView_SetImageList(hwndTree1, hImageList, TVSIL_STATE);
|
||||
}
|
||||
|
||||
if (TreeView_GetItemHeight(hwndTree1) < 16)
|
||||
TreeView_SetItemHeight(hwndTree1, 16);
|
||||
|
|
|
@ -266,7 +266,7 @@ const TCHAR * NSISCALL loadHeaders(int cl_flags)
|
|||
#ifndef NSIS_CONFIG_CRC_ANAL
|
||||
if (left < m_length)
|
||||
#endif//NSIS_CONFIG_CRC_ANAL
|
||||
crc = CRC32(crc, temp, l);
|
||||
crc = CRC32(crc, (unsigned char*)temp, l);
|
||||
|
||||
#endif//NSIS_CONFIG_CRC_SUPPORT
|
||||
m_pos += l;
|
||||
|
@ -350,7 +350,7 @@ const TCHAR * NSISCALL loadHeaders(int cl_flags)
|
|||
#if !defined(NSIS_COMPRESS_WHOLE) || !defined(NSIS_CONFIG_COMPRESSION_SUPPORT)
|
||||
|
||||
// Decompress data.
|
||||
int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
||||
int NSISCALL _dodecomp(int offset, HANDLE hFileOut, unsigned char *outbuf, int outbuflen)
|
||||
{
|
||||
static char inbuffer[IBUFSIZE+OBUFSIZE];
|
||||
char *outbuffer;
|
||||
|
@ -358,7 +358,7 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
int retval=0;
|
||||
int input_len;
|
||||
|
||||
outbuffer = outbuf?outbuf:(inbuffer+IBUFSIZE);
|
||||
outbuffer = outbuf?(char*)outbuf:(inbuffer+IBUFSIZE);
|
||||
|
||||
if (offset>=0)
|
||||
{
|
||||
|
@ -527,7 +527,7 @@ static int NSISCALL __ensuredata(int amount)
|
|||
}
|
||||
|
||||
|
||||
int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
||||
int NSISCALL _dodecomp(int offset, HANDLE hFileOut, unsigned char *outbuf, int outbuflen)
|
||||
{
|
||||
DWORD r;
|
||||
int input_len;
|
||||
|
|
|
@ -514,7 +514,7 @@ int NSISCALL isheader(firstheader *h); // returns 0 on not header, length_of_dat
|
|||
// (or m_uninstheader)
|
||||
const TCHAR * NSISCALL loadHeaders(int cl_flags);
|
||||
|
||||
int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen);
|
||||
int NSISCALL _dodecomp(int offset, HANDLE hFileOut, unsigned char *outbuf, int outbuflen);
|
||||
|
||||
#define GetCompressedDataFromDataBlock(offset, hFileOut) _dodecomp(offset,hFileOut,NULL,0)
|
||||
#define GetCompressedDataFromDataBlockToMemory(offset, out, out_len) _dodecomp(offset,NULL,out,out_len)
|
||||
|
|
|
@ -61,7 +61,6 @@ void GrowBuf::resize(int newlen)
|
|||
n = realloc(m_s, m_alloc);
|
||||
if (!n)
|
||||
{
|
||||
extern FILE *g_output;
|
||||
extern int g_display_errors;
|
||||
if (g_display_errors)
|
||||
{
|
||||
|
|
|
@ -217,7 +217,6 @@ void MMapFile::resize(int newsize)
|
|||
if (m_hFileDesc == -1)
|
||||
#endif
|
||||
{
|
||||
extern FILE *g_output;
|
||||
extern void quit(); extern int g_display_errors;
|
||||
if (g_display_errors)
|
||||
{
|
||||
|
@ -249,7 +248,6 @@ void *MMapFile::get(int offset, int *sizep) const
|
|||
|
||||
if (!m_iSize || offset + size > m_iSize)
|
||||
{
|
||||
extern FILE *g_output;
|
||||
extern void quit(); extern int g_display_errors;
|
||||
if (g_display_errors)
|
||||
{
|
||||
|
@ -275,7 +273,6 @@ void *MMapFile::get(int offset, int *sizep) const
|
|||
if (m_pView == MAP_FAILED)
|
||||
#endif
|
||||
{
|
||||
extern FILE *g_output;
|
||||
extern void quit(); extern int g_display_errors;
|
||||
if (g_display_errors)
|
||||
{
|
||||
|
|
|
@ -6504,7 +6504,7 @@ int CEXEBuild::add_file(const tstring& dir, const tstring& file, int attrib, con
|
|||
ent.offsets[4]=0;
|
||||
ent.offsets[5]=0;
|
||||
|
||||
if (ent.offsets[1] != INVALID_FILE_ATTRIBUTES)
|
||||
if (INVALID_FILE_ATTRIBUTES != (unsigned)ent.offsets[1])
|
||||
{
|
||||
a=add_entry(&ent);
|
||||
if (a != PS_OK)
|
||||
|
|
|
@ -171,7 +171,7 @@ int StringList::idx2pos(int idx) const
|
|||
{
|
||||
TCHAR *s=(TCHAR*) m_gr.get();
|
||||
int offs=0;
|
||||
size_t cnt=0;
|
||||
int cnt=0;
|
||||
if (idx>=0) while (offs < getcount())
|
||||
{
|
||||
if (cnt++ == idx) return offs;
|
||||
|
@ -228,7 +228,6 @@ int DefineList::add(const TCHAR *name, const TCHAR *value/*=_T("")*/)
|
|||
|
||||
if (!(*newvalue))
|
||||
{
|
||||
extern FILE *g_output;
|
||||
extern int g_display_errors;
|
||||
extern void quit();
|
||||
if (g_display_errors)
|
||||
|
|
|
@ -184,7 +184,6 @@ class SortedStringList
|
|||
newstruct.name=(TCHAR*)malloc((_tcslen(name)+1)*sizeof(TCHAR));
|
||||
if (!newstruct.name)
|
||||
{
|
||||
extern FILE *g_output;
|
||||
extern int g_display_errors;
|
||||
extern void quit();
|
||||
if (g_display_errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue