From 6bba242764e9d0c040a60a542396ce3ac3d6d509 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sun, 22 Jun 2014 18:50:54 +0000 Subject: [PATCH] Fixed 5 GCC warnings git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6502 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/nsDialogs/browse.c | 2 +- Source/build.cpp | 4 ++-- Source/script.cpp | 4 ++-- Source/zlib/INFBLOCK.C | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Contrib/nsDialogs/browse.c b/Contrib/nsDialogs/browse.c index ebc461c6..f5ef584f 100644 --- a/Contrib/nsDialogs/browse.c +++ b/Contrib/nsDialogs/browse.c @@ -176,4 +176,4 @@ void __declspec(dllexport) SelectFileDialog(HWND hwndParent, int string_size, TC // restore working dir // OFN_NOCHANGEDIR doesn't always work (see MSDN) SetCurrentDirectory(currentDirectory); -} \ No newline at end of file +} diff --git a/Source/build.cpp b/Source/build.cpp index bce3fa0b..7e10b69f 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -106,9 +106,9 @@ CEXEBuild::~CEXEBuild() } CEXEBuild::CEXEBuild(signed char pponly) : + preprocessonly(pponly), m_exehead(0), - m_exehead_size(0), - preprocessonly(pponly) + m_exehead_size(0) { set_verbosity(3); diff --git a/Source/script.cpp b/Source/script.cpp index 643d5876..ad3db9c4 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3136,9 +3136,9 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) case TOK_P_MAKENSIS: { const TCHAR *cmdname=get_commandtoken_name(which_token); - const TCHAR *exec=line.gettoken_str(1), *define; + const TCHAR *exec=line.gettoken_str(1), *define=0; int comp=line.gettoken_enum(2,_T("<\0>\0<>\0=\0ignore\0")); - int validparams=true, ret=-1, cmpv; + int validparams=true, ret=-1, cmpv=0; switch(line.getnumtokens()-1) { case 1: comp=4; break; diff --git a/Source/zlib/INFBLOCK.C b/Source/zlib/INFBLOCK.C index 3ca5b59d..be1ba13d 100644 --- a/Source/zlib/INFBLOCK.C +++ b/Source/zlib/INFBLOCK.C @@ -169,6 +169,9 @@ uInt *hn) /* working area: values in order of bit length */ int y; /* number of dummy codes added */ uInt z; /* number of entries in current table */ +#ifdef __GNUC__ + r.base = 0; // Avoid GCC "may be used uninitialized in this function" warning +#endif /* Generate counts for each bit length */ p=c;