Commit d2d5ef27 authored by Vincent Sanders's avatar Vincent Sanders

annotate error case fall through in switch to supress warnings

parent 4cea5a85
...@@ -299,6 +299,8 @@ search_web_ico_callback(hlcache_handle *ico, ...@@ -299,6 +299,8 @@ search_web_ico_callback(hlcache_handle *ico,
NSLOG(netsurf, INFO, "icon %s error: %s", NSLOG(netsurf, INFO, "icon %s error: %s",
nsurl_access(hlcache_handle_get_url(ico)), nsurl_access(hlcache_handle_get_url(ico)),
event->data.error); event->data.error);
/* fall through */
case CONTENT_MSG_ERRORCODE: case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(ico); hlcache_handle_release(ico);
/* clear reference to released handle */ /* clear reference to released handle */
...@@ -457,6 +459,8 @@ default_ico_callback(hlcache_handle *ico, ...@@ -457,6 +459,8 @@ default_ico_callback(hlcache_handle *ico,
NSLOG(netsurf, INFO, "icon %s error: %s", NSLOG(netsurf, INFO, "icon %s error: %s",
nsurl_access(hlcache_handle_get_url(ico)), nsurl_access(hlcache_handle_get_url(ico)),
event->data.error); event->data.error);
/* fall through */
case CONTENT_MSG_ERRORCODE: case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(ico); hlcache_handle_release(ico);
/* clear reference to released handle */ /* clear reference to released handle */
......
...@@ -113,6 +113,8 @@ html_convert_css_callback(hlcache_handle *css, ...@@ -113,6 +113,8 @@ html_convert_css_callback(hlcache_handle *css,
NSLOG(netsurf, INFO, "stylesheet %s failed: %s", NSLOG(netsurf, INFO, "stylesheet %s failed: %s",
nsurl_access(hlcache_handle_get_url(css)), nsurl_access(hlcache_handle_get_url(css)),
event->data.error); event->data.error);
/* fall through */
case CONTENT_MSG_ERRORCODE: case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(css); hlcache_handle_release(css);
s->sheet = NULL; s->sheet = NULL;
......
...@@ -96,7 +96,7 @@ nserror html_script_exec(html_content *c) ...@@ -96,7 +96,7 @@ nserror html_script_exec(html_content *c)
s->already_started = true; s->already_started = true;
} }
} }
} }
...@@ -105,8 +105,8 @@ nserror html_script_exec(html_content *c) ...@@ -105,8 +105,8 @@ nserror html_script_exec(html_content *c)
/* create new html script entry */ /* create new html script entry */
static struct html_script * static struct html_script *
html_process_new_script(html_content *c, html_process_new_script(html_content *c,
dom_string *mimetype, dom_string *mimetype,
enum html_script_type type) enum html_script_type type)
{ {
struct html_script *nscript; struct html_script *nscript;
...@@ -176,6 +176,8 @@ convert_script_async_cb(hlcache_handle *script, ...@@ -176,6 +176,8 @@ convert_script_async_cb(hlcache_handle *script,
NSLOG(netsurf, INFO, "script %s failed: %s", NSLOG(netsurf, INFO, "script %s failed: %s",
nsurl_access(hlcache_handle_get_url(script)), nsurl_access(hlcache_handle_get_url(script)),
event->data.error); event->data.error);
/* fall through */
case CONTENT_MSG_ERRORCODE: case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(script); hlcache_handle_release(script);
s->data.handle = NULL; s->data.handle = NULL;
...@@ -233,6 +235,8 @@ convert_script_defer_cb(hlcache_handle *script, ...@@ -233,6 +235,8 @@ convert_script_defer_cb(hlcache_handle *script,
NSLOG(netsurf, INFO, "script %s failed: %s", NSLOG(netsurf, INFO, "script %s failed: %s",
nsurl_access(hlcache_handle_get_url(script)), nsurl_access(hlcache_handle_get_url(script)),
event->data.error); event->data.error);
/* fall through */
case CONTENT_MSG_ERRORCODE: case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(script); hlcache_handle_release(script);
s->data.handle = NULL; s->data.handle = NULL;
...@@ -301,7 +305,7 @@ convert_script_sync_cb(hlcache_handle *script, ...@@ -301,7 +305,7 @@ convert_script_sync_cb(hlcache_handle *script,
err = dom_hubbub_parser_pause(parent->parser, false); err = dom_hubbub_parser_pause(parent->parser, false);
if (err != DOM_HUBBUB_OK) { if (err != DOM_HUBBUB_OK) {
NSLOG(netsurf, INFO, "unpause returned 0x%x", err); NSLOG(netsurf, INFO, "unpause returned 0x%x", err);
} }
break; break;
...@@ -309,8 +313,9 @@ convert_script_sync_cb(hlcache_handle *script, ...@@ -309,8 +313,9 @@ convert_script_sync_cb(hlcache_handle *script,
NSLOG(netsurf, INFO, "script %s failed: %s", NSLOG(netsurf, INFO, "script %s failed: %s",
nsurl_access(hlcache_handle_get_url(script)), nsurl_access(hlcache_handle_get_url(script)),
event->data.error); event->data.error);
case CONTENT_MSG_ERRORCODE: /* fall through */
case CONTENT_MSG_ERRORCODE:
hlcache_handle_release(script); hlcache_handle_release(script);
s->data.handle = NULL; s->data.handle = NULL;
parent->base.active--; parent->base.active--;
...@@ -324,7 +329,7 @@ convert_script_sync_cb(hlcache_handle *script, ...@@ -324,7 +329,7 @@ convert_script_sync_cb(hlcache_handle *script,
err = dom_hubbub_parser_pause(parent->parser, false); err = dom_hubbub_parser_pause(parent->parser, false);
if (err != DOM_HUBBUB_OK) { if (err != DOM_HUBBUB_OK) {
NSLOG(netsurf, INFO, "unpause returned 0x%x", err); NSLOG(netsurf, INFO, "unpause returned 0x%x", err);
} }
break; break;
...@@ -376,10 +381,10 @@ exec_src_script(html_content *c, ...@@ -376,10 +381,10 @@ exec_src_script(html_content *c,
* *
* Syncronously pause the parent parse and continue after * Syncronously pause the parent parse and continue after
* the script has downloaded and executed. (default) * the script has downloaded and executed. (default)
* Async Start the script downloading and execute it when it * Async Start the script downloading and execute it when it
* becomes available. * becomes available.
* Defered Start the script downloading and execute it when * Defered Start the script downloading and execute it when
* the page has completed parsing, may be set along * the page has completed parsing, may be set along
* with async where it is ignored. * with async where it is ignored.
*/ */
...@@ -388,7 +393,7 @@ exec_src_script(html_content *c, ...@@ -388,7 +393,7 @@ exec_src_script(html_content *c,
* value or the attribute name itself are valid. However * value or the attribute name itself are valid. However
* various browsers interpret this in various ways the most * various browsers interpret this in various ways the most
* compatible approach is to be liberal and accept any * compatible approach is to be liberal and accept any
* value. Note setting the values to "false" still makes them true! * value. Note setting the values to "false" still makes them true!
*/ */
exc = dom_element_has_attribute(node, corestring_dom_async, &async); exc = dom_element_has_attribute(node, corestring_dom_async, &async);
if (exc != DOM_NO_ERR) { if (exc != DOM_NO_ERR) {
...@@ -401,7 +406,7 @@ exec_src_script(html_content *c, ...@@ -401,7 +406,7 @@ exec_src_script(html_content *c,
script_cb = convert_script_async_cb; script_cb = convert_script_async_cb;
} else { } else {
exc = dom_element_has_attribute(node, exc = dom_element_has_attribute(node,
corestring_dom_defer, &defer); corestring_dom_defer, &defer);
if (exc != DOM_NO_ERR) { if (exc != DOM_NO_ERR) {
return DOM_HUBBUB_OK; /* dom error */ return DOM_HUBBUB_OK; /* dom error */
...@@ -444,14 +449,14 @@ exec_src_script(html_content *c, ...@@ -444,14 +449,14 @@ exec_src_script(html_content *c,
if (ns_error != NSERROR_OK) { if (ns_error != NSERROR_OK) {
/* @todo Deal with fetch error better. currently assume /* @todo Deal with fetch error better. currently assume
* fetch never became active * fetch never became active
*/ */
/* mark duff script fetch as already started */ /* mark duff script fetch as already started */
nscript->already_started = true; nscript->already_started = true;
NSLOG(netsurf, INFO, "Fetch failed with error %d", ns_error); NSLOG(netsurf, INFO, "Fetch failed with error %d", ns_error);
} else { } else {
/* update base content active fetch count */ /* update base content active fetch count */
c->base.active++; c->base.active++;
NSLOG(netsurf, INFO, "%d fetches active", c->base.active); NSLOG(netsurf, INFO, "%d fetches active", c->base.active);
switch (script_type) { switch (script_type) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment