diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-12-20 19:10:44 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-12-20 19:10:44 +0000 |
commit | 9f98d623506e7b7a86561152807526aeb2bb5be3 (patch) | |
tree | 271ff3535fa7cc8d2d74f82aebe179312c69aa9a /protocols/Omegle/src/communication.cpp | |
parent | c913257a1eb9b0fdcac33c1b45b309261048f761 (diff) |
Omegle: Various code improvements (as reported by Coverity analyser); version bump
This also fixes no locking of EventsLoop (and eventually related issues)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Omegle/src/communication.cpp')
-rw-r--r-- | protocols/Omegle/src/communication.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index fb2641a88b..eba4f12aca 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -136,10 +136,10 @@ bool Omegle_client::handle_error(const std::string &method, bool force_disconnec std::string Omegle_client::get_server( bool not_last )
{
- BYTE q = not_last ? 1 : 0;
+ int q = not_last ? 1 : 0;
int server = db_get_b(NULL, parent->m_szModuleName, OMEGLE_KEY_SERVER, 0);
- if (server < 0 || server >= (SIZEOF(servers)-q))
+ if (server < 0 || server >= (int)(SIZEOF(servers)-q))
server = 0;
if (server == 0) {
@@ -286,6 +286,7 @@ NETLIBHTTPHEADER* Omegle_client::get_request_headers( int request_type, int* hea case OMEGLE_REQUEST_RECAPTCHA:
headers[3].szName = "Content-Type";
headers[3].szValue = "application/x-www-form-urlencoded; charset=utf-8";
+ // intentionally no break;
case OMEGLE_REQUEST_HOME:
case OMEGLE_REQUEST_COUNT:
@@ -304,7 +305,7 @@ NETLIBHTTPHEADER* Omegle_client::get_request_headers( int request_type, int* hea void Omegle_client::store_headers( http::response* resp, NETLIBHTTPHEADER* headers, int headersCount )
{
- for ( size_t i = 0; i < headersCount; i++ )
+ for ( size_t i = 0; i < (size_t)headersCount; i++ )
{
std::string header_name = headers[i].szName;
std::string header_value = headers[i].szValue;
|