diff --git a/libs/picomodel/picomodel.c b/libs/picomodel/picomodel.c index d60478b834..6edd458bad 100644 --- a/libs/picomodel/picomodel.c +++ b/libs/picomodel/picomodel.c @@ -1408,8 +1408,9 @@ int PicoGetHashTableSize( void ) unsigned int calculateHash(unsigned char* str, size_t len) { unsigned int hash = 5381; - int c, i; - + int c; + size_t i; + for (i = 0; i < len; ++i) { c = str[i]; diff --git a/plugins/dm.gui/ReadableEditorDialog.cpp b/plugins/dm.gui/ReadableEditorDialog.cpp index 2677fdc101..9c5ab2a7b6 100644 --- a/plugins/dm.gui/ReadableEditorDialog.cpp +++ b/plugins/dm.gui/ReadableEditorDialog.cpp @@ -1202,11 +1202,11 @@ void ReadableEditorDialog::checkGuiLayout() if (dialog.run() == ui::IDialog::RESULT_YES) { XData::PageLayout layoutBefore = _xData->getPageLayout(); - std::string guiName = GuiSelector::Run(_xData->getPageLayout() == XData::TwoSided, this); + std::string selectedGuiName = GuiSelector::Run(_xData->getPageLayout() == XData::TwoSided, this); - if (!guiName.empty()) + if (!selectedGuiName.empty()) { - _guiEntry->SetValue(guiName); + _guiEntry->SetValue(selectedGuiName); _runningGuiLayoutCheck = false; updateGuiView(); return; diff --git a/plugins/dm.gui/gui/GuiScript.cpp b/plugins/dm.gui/gui/GuiScript.cpp index b005881b3a..35268ad162 100644 --- a/plugins/dm.gui/gui/GuiScript.cpp +++ b/plugins/dm.gui/gui/GuiScript.cpp @@ -222,10 +222,10 @@ void GuiScript::switchOnToken(const std::string& token, parser::DefTokeniser& to // Another block, a group of statements, enter recursion while (tokeniser.hasMoreTokens() && _curLevel == blockLevel) { - std::string token = tokeniser.nextToken(); - boost::algorithm::to_lower(token); + std::string nextToken = tokeniser.nextToken(); + boost::algorithm::to_lower(nextToken); - switchOnToken(token, tokeniser); + switchOnToken(nextToken, tokeniser); } } else if (token == "set") diff --git a/plugins/dm.gui/gui/GuiWindowDef.cpp b/plugins/dm.gui/gui/GuiWindowDef.cpp index e3a663e81f..61e391405a 100644 --- a/plugins/dm.gui/gui/GuiWindowDef.cpp +++ b/plugins/dm.gui/gui/GuiWindowDef.cpp @@ -264,11 +264,11 @@ void GuiWindowDef::constructFromTokens(parser::DefTokeniser& tokeniser) std::string timeStr = tokeniser.nextToken(); // Check the time for validity - std::size_t time = string::convert( + std::size_t onTime = string::convert( timeStr, std::numeric_limits::max() ); - if (time == std::numeric_limits::max()) + if (onTime == std::numeric_limits::max()) { rWarning() << "Invalid time encountered in onTime event in " << name << ": " << timeStr << std::endl; @@ -279,7 +279,7 @@ void GuiWindowDef::constructFromTokens(parser::DefTokeniser& tokeniser) script->constructFromTokens(tokeniser); - _timedEvents.insert(TimedEventMap::value_type(time, script)); + _timedEvents.insert(TimedEventMap::value_type(onTime, script)); } else if (token == "onnamedevent") { @@ -399,25 +399,25 @@ void GuiWindowDef::update(const std::size_t timeStep, bool updateChildren) } } -void GuiWindowDef::initTime(const std::size_t time, bool updateChildren) +void GuiWindowDef::initTime(const std::size_t toTime, bool updateChildren) { - this->time = time; + this->time = toTime; if (updateChildren) { for (ChildWindows::const_iterator i = children.begin(); i != children.end(); ++i) { - (*i)->initTime(time, updateChildren); + (*i)->initTime(toTime, updateChildren); } } } -GuiWindowDefPtr GuiWindowDef::findWindowDef(const std::string& name) +GuiWindowDefPtr GuiWindowDef::findWindowDef(const std::string& windowName) { // First look at all direct children for (ChildWindows::const_iterator i = children.begin(); i != children.end(); ++i) { - if ((*i)->name == name) + if ((*i)->name == windowName) { return (*i); } @@ -426,7 +426,7 @@ GuiWindowDefPtr GuiWindowDef::findWindowDef(const std::string& name) // Not found, ask each child to search for the windowDef for (ChildWindows::const_iterator i = children.begin(); i != children.end(); ++i) { - GuiWindowDefPtr window = (*i)->findWindowDef(name); + GuiWindowDefPtr window = (*i)->findWindowDef(windowName); if (window != NULL) return window; } diff --git a/plugins/particles/StageDef.cpp b/plugins/particles/StageDef.cpp index 8a4d4fd73b..cad9a1da98 100644 --- a/plugins/particles/StageDef.cpp +++ b/plugins/particles/StageDef.cpp @@ -551,7 +551,7 @@ Vector4 StageDef::parseVector4(parser::DefTokeniser& tok) std::ostream& operator<<(std::ostream& stream, const StageDef& stage) { - std::size_t prevPrecision = stream.precision(); + std::streamsize prevPrecision = stream.precision(); // Three post-comma digits precision stream.precision(3); diff --git a/tools/msvc/dm.stimresponse.vcxproj b/tools/msvc/dm.stimresponse.vcxproj index f88a8a553a..61fe56b604 100644 --- a/tools/msvc/dm.stimresponse.vcxproj +++ b/tools/msvc/dm.stimresponse.vcxproj @@ -121,7 +121,6 @@ Disabled _CRT_SECURE_NO_DEPRECATE;WIN32;%(PreprocessorDefinitions) true - true Default