Some warning fixes, unreferenced local variables.

This commit is contained in:
KimLS
2013-02-16 22:07:32 -08:00
parent 7c706d9871
commit 15dc9cfaf4
10 changed files with 5 additions and 22 deletions
+2 -4
View File
@@ -216,8 +216,6 @@ void HttpdSocket::OnData(const char *p,size_t l)
void HttpdSocket::Send64(const std::string& str64, const std::string& type)
{
Base64 bb;
if (!strcasecmp(m_start.c_str(), m_if_modified_since.c_str()))
{
SetStatus("304");
@@ -226,7 +224,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
}
else
{
size_t len = bb.decode_length(str64);
size_t len = Base64::decode_length(str64);
unsigned char *buf = new unsigned char[len];
SetStatus("200");
@@ -237,7 +235,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
AddResponseHeader("Last-modified", m_start);
SendResponse();
bb.decode(str64, buf, len);
Base64::decode(str64, buf, len);
SendBuf( (char *)buf, len);
delete[] buf;
}
+2 -4
View File
@@ -37,8 +37,7 @@ namespace SOCKETS_NAMESPACE {
std::string Utility::base64(const std::string& str_in)
{
std::string str;
Base64 m_b;
m_b.encode(str_in, str, false); // , false == do not add cr/lf
Base64::encode(str_in, str, false); // , false == do not add cr/lf
return str;
}
@@ -46,8 +45,7 @@ std::string Utility::base64(const std::string& str_in)
std::string Utility::base64d(const std::string& str_in)
{
std::string str;
Base64 m_b;
m_b.decode(str_in, str);
Base64::decode(str_in, str);
return str;
}