From e080c4bf21a69d3e4472edd080a422c1f7780498 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 22 May 2016 16:18:09 +0300 Subject: SCUMM: Fix warnings thrown by MSVC --- engines/scumm/he/moonbase/ai_main.cpp | 2 +- engines/scumm/he/moonbase/ai_node.h | 2 +- engines/scumm/he/moonbase/ai_tree.cpp | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/scumm/he') diff --git a/engines/scumm/he/moonbase/ai_main.cpp b/engines/scumm/he/moonbase/ai_main.cpp index 501aab5912..1a191a1328 100644 --- a/engines/scumm/he/moonbase/ai_main.cpp +++ b/engines/scumm/he/moonbase/ai_main.cpp @@ -726,7 +726,7 @@ int masterControlProgram(const int paramCount, const int *params) { // Here to scope tempLaunchAction int *tempLaunchAction = NULL; - int errCod; + int errCod = 0; _acquireTarget++; diff --git a/engines/scumm/he/moonbase/ai_node.h b/engines/scumm/he/moonbase/ai_node.h index 454b98e0b5..0a60dee9ca 100644 --- a/engines/scumm/he/moonbase/ai_node.h +++ b/engines/scumm/he/moonbase/ai_node.h @@ -28,7 +28,7 @@ namespace Scumm { const float SUCCESS = -1; -const float FAILURE = 1e20; +const float FAILURE = 1e20f; class IContainedObject { private: diff --git a/engines/scumm/he/moonbase/ai_tree.cpp b/engines/scumm/he/moonbase/ai_tree.cpp index 2335d567e9..efbf3e3a99 100644 --- a/engines/scumm/he/moonbase/ai_tree.cpp +++ b/engines/scumm/he/moonbase/ai_tree.cpp @@ -80,7 +80,7 @@ Tree::~Tree() { while (pNodeItr != NULL) { // If any children are left, move to one of them if (!(pNodeItr->getChildren().empty())) { - int size = (pNodeItr->getChildren()).size(); + //int size = (pNodeItr->getChildren()).size(); pNodeItr = pNodeItr->popChild(); } else { // Delete this node, and move up to the parent for further processing @@ -157,11 +157,10 @@ Node *Tree::aStarSearch_singlePassInit() { Node *Tree::aStarSearch_singlePass(Node **currentNode) { currentNode = NULL; - float currentT; - Node *retNode = NULL; #if 0 + float currentT; static int maxTime = 0; if (currentChildIndex == 1) { -- cgit v1.2.3