Skip to content

Commit 893a8a6

Browse files
committed
- Fixed some github/"codacy" issues.
1 parent 2da9716 commit 893a8a6

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

CommonLib/md5.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ void MD5::update(const unsigned char input[], size_type length)
290290
// for convenience provide a verson with signed char
291291
void MD5::update(const char input[], size_type length)
292292
{
293-
update((const unsigned char*)input, length);
293+
update(reinterpret_cast<const unsigned char*>(input), length);
294294
}
295295

296296
//////////////////////////////
@@ -299,14 +299,14 @@ void MD5::update(const char input[], size_type length)
299299
// the message digest and zeroizing the context.
300300
MD5& MD5::finalize()
301301
{
302-
static unsigned char padding[64] = {
303-
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
304-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
305-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
306-
};
307-
308302
if (!finalized)
309303
{
304+
static unsigned char padding[64] = {
305+
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
306+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
307+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
308+
};
309+
310310
// Save number of bits
311311
unsigned char bits[8];
312312
encode(bits, count, 8);

Http2Fetch.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SockTest.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
1+
// SockTest.cpp : Definiert den Einstiegspunkt f�r die Konsolenanwendung.
22
//
33
#include <iostream>
44
#include <unordered_map>
@@ -120,17 +120,17 @@ int main(int argc, const char* argv[], char **envp)
120120
if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"CONTENT_TYPE") ? true : false; })) != end(mapEnvList))
121121
strContentTyp = itFound->second;
122122

123-
wstring strHost;
124-
if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"HTTP_HOST") ? true : false; })) != end(mapEnvList))
125-
strHost = itFound->second;
123+
//wstring strHost;
124+
//if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"HTTP_HOST") ? true : false; })) != end(mapEnvList))
125+
// strHost = itFound->second;
126126

127-
wstring strHttps;
128-
if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"HTTPS") ? true : false; })) != end(mapEnvList))
129-
strHttps = itFound->second;
127+
//wstring strHttps;
128+
//if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"HTTPS") ? true : false; })) != end(mapEnvList))
129+
// strHttps = itFound->second;
130130

131-
wstring strQuery;
132-
if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"QUERY_STRING") ? true : false; })) != end(mapEnvList))
133-
strQuery = itFound->second;
131+
//wstring strQuery;
132+
//if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"QUERY_STRING") ? true : false; })) != end(mapEnvList))
133+
// strQuery = itFound->second;
134134

135135
wstring strUrl;
136136
if ((itFound = find_if(begin(mapEnvList), end(mapEnvList), [](auto pr) { return (pr.first == L"PROXYURL") ? true : false; })) != end(mapEnvList))
@@ -299,7 +299,7 @@ if (nPos != string::npos)
299299
fetch.AddToHeader("Accept-Encoding", "gzip, deflate, br");
300300
fetch.AddToHeader("Cache-Control", "no-cache");
301301

302-
fetch.AddToHeader("Accept-Language", "de,en-US;q=0.7,en;q=0.3"); // wird für elumatec.com benötigt
302+
fetch.AddToHeader("Accept-Language", "de,en-US;q=0.7,en;q=0.3"); // wird f�r elumatec.com ben�tigt
303303
//fetch.AddToHeader("DNT", "1");
304304
//fetch.AddToHeader("Connection", "keep-alive");
305305
//fetch.AddToHeader("Connection", "close");

Http2Serv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void ReadConfiguration(const wstring& m_strModulePath, deque<CHttpServ>& m_vServ
4848
static const pair<wstring, int> strKeyWordMultiItems[] = { { L"RewriteRule",1 },{ L"AliasMatch",2 },{ L"ForceType",3 },{ L"FileTyps",4 },{ L"SetEnvIf",5 },{ L"RedirectMatch",6 },{ L"DeflateTyps",7 },{ L"Authenticate",8 },{ L"ScriptAliasMatch",9 },
4949
{ L"ScriptOptionsHdl",10 },{ L"AddHeader", 11 },{ L"ReverseProxy", 12},{ L"ScriptAuthHdl",13 } };
5050

51-
vector<wstring> vFileTypExt = conf.get(L"FileTyps");
51+
//vector<wstring> vFileTypExt = conf.get(L"FileTyps");
5252

5353
vector<wstring> vListen = conf.get(L"Listen");
5454
if (vListen.empty() == true)

MappedFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool MappedFile::open(const std::wstring& fileName)
6161
return false;
6262
}
6363

64-
mappedData = (const uint8_t *)MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, fileSize);
64+
mappedData = static_cast<const uint8_t*>(MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, fileSize));
6565

6666
/* We can call CloseHandle here, but it will not be closed until
6767
* we unmap the view */

Timer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <atomic>
1818
#include <thread>
1919
#include <functional>
20+
#include <chrono>
2021

2122
template<class T>
2223
class Timer

0 commit comments

Comments
 (0)