summaryrefslogtreecommitdiff
path: root/riscos/gui/throbber.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /riscos/gui/throbber.c
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz
netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2
Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging.
Diffstat (limited to 'riscos/gui/throbber.c')
-rw-r--r--riscos/gui/throbber.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/riscos/gui/throbber.c b/riscos/gui/throbber.c
index 5e2c87678..2eabb3e7e 100644
--- a/riscos/gui/throbber.c
+++ b/riscos/gui/throbber.c
@@ -79,7 +79,7 @@ struct throbber *ro_gui_throbber_create(struct theme_descriptor *theme)
throbber = malloc(sizeof(struct throbber));
if (throbber == NULL) {
- LOG(("No memory for malloc()"));
+ LOG("No memory for malloc()");
return NULL;
}
@@ -246,8 +246,7 @@ bool ro_gui_throbber_icon_update(struct throbber *throbber)
error = xwimp_create_icon(&icon, &throbber->icon);
if (error != NULL) {
- LOG(("xwimp_create_icon: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_create_icon: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
throbber->icon = -1;
return false;
@@ -258,8 +257,7 @@ bool ro_gui_throbber_icon_update(struct throbber *throbber)
} else if (throbber->hidden && throbber->icon != -1) {
error = xwimp_delete_icon(throbber->window, throbber->icon);
if (error != NULL) {
- LOG(("xwimp_delete_icon: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_delete_icon: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
return false;
}
@@ -295,8 +293,7 @@ bool ro_gui_throbber_icon_resize(struct throbber *throbber)
throbber->extent.x0, throbber->extent.y0,
throbber->extent.x1, throbber->extent.y1);
if (error != NULL) {
- LOG(("xwimp_resize_icon: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess);
warn_user("WimpError", error->errmess);
throbber->icon = -1;
return false;