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:
pabs3 2007-04-02 10:29:35 +00:00
parent cab85d397f
commit e873b82b53
7 changed files with 23 additions and 7 deletions

View file

@ -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
{

View file

@ -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;

View file

@ -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[];

View file

@ -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 = "";