summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-02-14 04:24:25 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-02-14 04:24:25 (GMT)
commit7ed7db88a4c3efb93b0ee21e94aaef94e4d89e9d (patch)
tree780e35366700fdf598965da60a25d6692e3274fc
parentf388ce53210d983dc99547b135e839487792bcb1 (diff)
downloadCMake-7ed7db88a4c3efb93b0ee21e94aaef94e4d89e9d.zip
CMake-7ed7db88a4c3efb93b0ee21e94aaef94e4d89e9d.tar.gz
CMake-7ed7db88a4c3efb93b0ee21e94aaef94e4d89e9d.tar.bz2
CPackIFW: Fix cppcheck warnings
The cppcheck warnings about uninitialised variables are likely harmless, since they are initialised in ParseResource() anyway. Fix the warnings anyway to reduce linting noise. The warning about a single argument non-explicit constructor is worth fixing in general.
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 359fc56..d3c39e8 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -275,9 +275,8 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
class cmCPackIFWResourcesParser : public cmXMLParser
{
public:
- cmCPackIFWResourcesParser(cmCPackIFWInstaller* i)
+ explicit cmCPackIFWResourcesParser(cmCPackIFWInstaller* i)
: installer(i)
- , file(false)
{
this->path = i->Directory + "/resources";
}
@@ -296,7 +295,9 @@ public:
}
cmCPackIFWInstaller* installer;
- bool file, hasFiles, hasErrors;
+ bool file = false;
+ bool hasFiles = false;
+ bool hasErrors = false;
std::string path, basePath;
protected: