Skip to content

Commit f890047

Browse files
committed
[[ Cleanup ]] resolve various warnings in browser src
1 parent bdd22a7 commit f890047

File tree

4 files changed

+29
-20
lines changed

4 files changed

+29
-20
lines changed

libbrowser/src/libbrowser_cef.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ static const char *s_auth_scheme_strings[] =
249249

250250
bool MCCefAuthSchemeFromCefString(const CefString &p_string, MCCefAuthScheme &r_scheme)
251251
{
252-
const char **t_strings;
253-
t_strings = s_auth_scheme_strings;
254-
252+
255253
for (uint32_t i = 0; s_auth_scheme_strings[i] != nil; i++)
256254
{
257255
if (p_string == s_auth_scheme_strings[i])
@@ -676,6 +674,16 @@ class MCCefMessageResult
676674
MCCStringFree(t_tmp);
677675
}
678676
break;
677+
case VTYPE_NULL:
678+
case VTYPE_BOOL:
679+
case VTYPE_DOUBLE:
680+
case VTYPE_STRING:
681+
case VTYPE_BINARY:
682+
case VTYPE_DICTIONARY:
683+
case VTYPE_LIST:
684+
case VTYPE_INVALID:
685+
/* UNIMPLEMENTED */
686+
break;
679687
}
680688

681689
return t_converted;
@@ -875,10 +883,7 @@ class MCCefBrowserClient : public CefClient, CefLifeSpanHandler, CefRequestHandl
875883

876884
if (t_success)
877885
t_success = MCCefStringToUtf8String(t_args->GetString(0), t_handler);
878-
879-
uint32_t t_arg_count;
880-
t_arg_count = 0;
881-
886+
882887
MCBrowserListRef t_param_list;
883888
t_param_list = nil;
884889

@@ -1671,10 +1676,7 @@ bool MCCefBrowserBase::EvaluateJavaScript(const char *p_script, char *&r_result)
16711676
{
16721677
bool t_success;
16731678
t_success = true;
1674-
1675-
const MCCefMessageResult *t_result;
1676-
t_result = nil;
1677-
1679+
16781680
CefString t_script;
16791681
t_success = MCCefStringFromUtf8String(p_script, t_script);
16801682

libbrowser/src/libbrowser_cefprocess.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ bool MCCefListToV8List(CefRefPtr<CefV8Context> p_context, CefRefPtr<CefListValue
129129
case VTYPE_LIST:
130130
/* TODO - IMPLEMENT */
131131
t_success = false;
132+
break;
133+
case VTYPE_INVALID:
134+
t_success = false;
132135
}
133136

134137
t_success = t_v8 != NULL;
@@ -226,10 +229,7 @@ bool MCCefV8ObjectToDictionary(CefRefPtr<CefV8Context> p_context, CefRefPtr<CefV
226229
{
227230
CefRefPtr<CefV8Value> t_val;
228231
t_val = p_obj->GetValue(*i);
229-
230-
uint32_t t_index;
231-
t_index = i - t_keys.begin();
232-
232+
233233
if (t_val->IsBool())
234234
t_success = t_dict->SetBool(*i, t_val->GetBoolValue());
235235
else if (t_val->IsInt())

revbrowser/src/cefbrowser.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ static const char *s_auth_scheme_strings[] =
8888

8989
bool MCCefAuthSchemeFromCefString(const CefString &p_string, MCCefAuthScheme &r_scheme)
9090
{
91-
const char **t_strings;
92-
t_strings = s_auth_scheme_strings;
9391

9492
for (uint32_t i = 0; s_auth_scheme_strings[i] != nil; i++)
9593
{
@@ -418,6 +416,15 @@ class MCCefMessageResult
418416
MCCStringFree(t_tmp);
419417
}
420418
break;
419+
case VTYPE_NULL:
420+
case VTYPE_BOOL:
421+
case VTYPE_DOUBLE:
422+
case VTYPE_BINARY:
423+
case VTYPE_STRING:
424+
case VTYPE_DICTIONARY:
425+
case VTYPE_LIST:
426+
case VTYPE_INVALID:
427+
break;
421428
}
422429

423430
return t_converted;
@@ -1581,9 +1588,6 @@ char *MCCefBrowserBase::ExecuteScript(const char *p_javascript_string)
15811588
bool t_success;
15821589
t_success = true;
15831590

1584-
const MCCefMessageResult *t_result;
1585-
t_result = nil;
1586-
15871591
CefString t_script;
15881592
t_success = MCCefStringFromUtf8String(p_javascript_string, t_script);
15891593

revbrowser/src/cefprocess.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ bool MCCefListToV8List(CefRefPtr<CefV8Context> p_context, CefRefPtr<CefListValue
129129
case VTYPE_LIST:
130130
/* TODO - IMPLEMENT */
131131
t_success = false;
132+
break;
133+
case VTYPE_INVALID:
134+
t_success = false;
132135
}
133136

134137
t_success = t_v8 != NULL;

0 commit comments

Comments
 (0)