From 1d7c3984ca2e9a1299c8c546b0d9194073dac556 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Tue, 5 Jun 2018 21:55:23 +0100 Subject: [PATCH] Fix minor warning for no return value. --- simgear/io/HTTPRepository.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/simgear/io/HTTPRepository.cxx b/simgear/io/HTTPRepository.cxx index 690d5622..2c1c61c6 100644 --- a/simgear/io/HTTPRepository.cxx +++ b/simgear/io/HTTPRepository.cxx @@ -90,8 +90,10 @@ namespace simgear case HTTPRepository::REPO_ERROR_CANCELLED: return "cancelled"; case HTTPRepository::REPO_PARTIAL_UPDATE: return "partial update (incomplete)"; } + + return "Unknown response code"; } - + class HTTPRepoPrivate { public: @@ -291,7 +293,7 @@ public: if (!cp.exists()) { continue; } - + SGBinaryFile src(cp); SGBinaryFile dst(p); src.open(SG_IO_IN); @@ -677,7 +679,7 @@ std::string HTTPRepository::resultCodeAsString(ResultCode code) { return innerResultCodeAsString(code); } - + HTTPRepository::ResultCode HTTPRepository::failure() const { @@ -746,7 +748,7 @@ HTTPRepository::failure() const if (responseCode() == -1) { code = HTTPRepository::REPO_ERROR_CANCELLED; } - + file.reset(); if (pathInRepo.exists()) { pathInRepo.remove(); @@ -1084,7 +1086,7 @@ HTTPRepository::failure() const } else { // we encounter this code path when deleting an orphaned directory } - + Dir dir(absPath); bool result = dir.remove(true); @@ -1152,7 +1154,7 @@ HTTPRepository::failure() const } SG_LOG(SG_TERRASYNC, SG_WARN, "failed to update repository:" << baseUrl - << "\n\tchecksum failure for: " << relativePath + << "\n\tchecksum failure for: " << relativePath << "\n\tthis typically indicates the remote repository is corrupt or was being updated during the sync"); } else if (fileStatus == HTTPRepository::REPO_ERROR_CANCELLED) { // if we were cancelled, don't report or log