Kill some more compiler warnings under Linux and mingw32
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5031 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
cab85d397f
commit
e873b82b53
7 changed files with 23 additions and 7 deletions
|
@ -3,6 +3,12 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define UNUSED
|
||||
#endif
|
||||
|
||||
// only include this file from one place in your DLL.
|
||||
// (it is all static, if you use it in two places it will fail)
|
||||
|
||||
|
@ -26,8 +32,10 @@ static unsigned int g_stringsize;
|
|||
static stack_t **g_stacktop;
|
||||
static char *g_variables;
|
||||
|
||||
static int __stdcall popstring(char *str); // 0 on success, 1 on empty stack
|
||||
static void __stdcall pushstring(const char *str);
|
||||
static int __stdcall popstring(char *str) UNUSED; // 0 on success, 1 on empty stack
|
||||
static void __stdcall pushstring(const char *str) UNUSED;
|
||||
static char * __stdcall getuservariable(const int varnum) UNUSED;
|
||||
static void __stdcall setuservariable(const int varnum, const char *var) UNUSED;
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -1090,7 +1090,7 @@ int WINAPI createCfgDlg()
|
|||
|
||||
#undef DEFAULT_STYLES
|
||||
|
||||
if (pField->nType < 1 || pField->nType > (sizeof(ClassTable) / sizeof(ClassTable[0])))
|
||||
if (pField->nType < 1 || pField->nType > (int)(sizeof(ClassTable) / sizeof(ClassTable[0])))
|
||||
continue;
|
||||
|
||||
DWORD dwStyle, dwExStyle;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
NTOOLTIP g_tip;
|
||||
LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
char g_mru_list[MRU_LIST_SIZE][MAX_PATH] = { NULL, NULL, NULL, NULL, NULL };
|
||||
char g_mru_list[MRU_LIST_SIZE][MAX_PATH] = { "", "", "", "", "" };
|
||||
|
||||
extern NSCRIPTDATA g_sdata;
|
||||
extern char *compressor_names[];
|
||||
|
|
|
@ -28,7 +28,7 @@ void __declspec(dllexport) GetAccountType(HWND hwndParent, int string_size,
|
|||
DWORD cbTokenGroups;
|
||||
DWORD i, j;
|
||||
|
||||
SID_IDENTIFIER_AUTHORITY SystemSidAuthority = SECURITY_NT_AUTHORITY;
|
||||
SID_IDENTIFIER_AUTHORITY SystemSidAuthority = {SECURITY_NT_AUTHORITY};
|
||||
|
||||
char *group = "";
|
||||
|
||||
|
|
|
@ -440,6 +440,8 @@ token get_token(input * in)
|
|||
int c;
|
||||
int nls;
|
||||
token ret;
|
||||
ret.cmd = c__invalid;
|
||||
ret.aux = FALSE;
|
||||
rdstring rs = { 0, 0, NULL };
|
||||
filepos cpos;
|
||||
|
||||
|
|
|
@ -162,6 +162,12 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define UNUSED
|
||||
#endif
|
||||
|
||||
// macros
|
||||
|
||||
#ifndef _WIN32
|
||||
|
|
|
@ -1144,7 +1144,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
case EW_DELREG:
|
||||
{
|
||||
long res=!ERROR_SUCCESS;
|
||||
const char *rkn=RegKeyHandleToName((HKEY)parm1);
|
||||
const char *rkn UNUSED=RegKeyHandleToName((HKEY)parm1);
|
||||
if (!parm4)
|
||||
{
|
||||
HKEY hKey=myRegOpenKey(KEY_SET_VALUE);
|
||||
|
@ -1174,7 +1174,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
int rtype=parm5;
|
||||
char *buf0=GetStringFromParm(0x02);
|
||||
char *buf1=GetStringFromParm(0x11);
|
||||
const char *rkn=RegKeyHandleToName(rootkey);
|
||||
const char *rkn UNUSED=RegKeyHandleToName(rootkey);
|
||||
|
||||
exec_error++;
|
||||
if (RegCreateKeyEx(rootkey,buf1,0,0,REG_OPTION_NON_VOLATILE,KEY_SET_VALUE,0,&hKey,0) == ERROR_SUCCESS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue