summaryrefslogtreecommitdiff
path: root/project2/cgi
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2012-07-09 18:26:22 +0000
committerrandomdan <randomdan@localhost>2012-07-09 18:26:22 +0000
commitfaac604b47a2fd86ae9b56e26437aad2d8460e0c (patch)
treec3d6d7cb12ac00b53d3e251dd33cfa7a9cf71361 /project2/cgi
parentWrite sha1 hashes onto presenter cache files and validate client caches with ... (diff)
downloadproject2-faac604b47a2fd86ae9b56e26437aad2d8460e0c.tar.bz2
project2-faac604b47a2fd86ae9b56e26437aad2d8460e0c.tar.xz
project2-faac604b47a2fd86ae9b56e26437aad2d8460e0c.zip
Fixes suggested by cppcheck
Diffstat (limited to 'project2/cgi')
-rw-r--r--project2/cgi/cgiEnvironment.cpp2
-rw-r--r--project2/cgi/cgiStagePresent.cpp4
-rw-r--r--project2/cgi/testCgi.cpp3
3 files changed, 6 insertions, 3 deletions
diff --git a/project2/cgi/cgiEnvironment.cpp b/project2/cgi/cgiEnvironment.cpp
index af99f0d..7bb68d2 100644
--- a/project2/cgi/cgiEnvironment.cpp
+++ b/project2/cgi/cgiEnvironment.cpp
@@ -26,6 +26,8 @@ makeVector(const boost::filesystem::path & y)
}
CgiEnvironment::CgiEnvironment() :
+ cgi(NULL),
+ cgienv(NULL),
cgiOptions("Project2 CGI options"),
hpi(new HostnamePlatformIdentifier())
{
diff --git a/project2/cgi/cgiStagePresent.cpp b/project2/cgi/cgiStagePresent.cpp
index 1c6edaf..7282def 100644
--- a/project2/cgi/cgiStagePresent.cpp
+++ b/project2/cgi/cgiStagePresent.cpp
@@ -48,10 +48,10 @@ CgiApplicationEngine::PresentStage::run()
header = HttpHeaderPtr(new Project2HttpHeader("404 Not found"));
return NextStage(NULL, this, boost::dynamic_pointer_cast<TransformSource>(presenter), presenter);
}
- catch (ResponseStagePtr p) {
+ catch (ResponseStagePtr & p) {
return NextStage(NULL, p, boost::dynamic_pointer_cast<TransformSource>(p), boost::dynamic_pointer_cast<Presenter>(p));
}
- catch (StagePtr p) {
+ catch (StagePtr & p) {
return NextStage(p, NULL, boost::dynamic_pointer_cast<TransformSource>(p), boost::dynamic_pointer_cast<Presenter>(p));
}
}
diff --git a/project2/cgi/testCgi.cpp b/project2/cgi/testCgi.cpp
index fb480a4..8cf5606 100644
--- a/project2/cgi/testCgi.cpp
+++ b/project2/cgi/testCgi.cpp
@@ -28,7 +28,8 @@ class TestInput : public cgicc::CgiInput, public CgiEnvInput {
typedef std::map<std::string, StrPtr> OptStore;
OptStore optStore;
TestInput() :
- opts("Project2 CGI test options")
+ opts("Project2 CGI test options"),
+ runCount(0)
{
opts
TESTOPT("SERVER_NAME", "localhost", "FQDN of web service")