summaryrefslogtreecommitdiff
path: root/framebuffer/framebuffer.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 /framebuffer/framebuffer.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 'framebuffer/framebuffer.c')
-rw-r--r--framebuffer/framebuffer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/framebuffer/framebuffer.c b/framebuffer/framebuffer.c
index 927e6318f..97760cfc6 100644
--- a/framebuffer/framebuffer.c
+++ b/framebuffer/framebuffer.c
@@ -317,7 +317,7 @@ framebuffer_plot_path(const float *p,
colour c,
const float transform[6])
{
- LOG(("path unimplemented"));
+ LOG("path unimplemented");
return true;
}
@@ -375,7 +375,7 @@ static bool framebuffer_format_from_bpp(int bpp, enum nsfb_format_e *fmt)
break;
default:
- LOG(("Bad bits per pixel (%d)\n", bpp));
+ LOG("Bad bits per pixel (%d)\n", bpp);
return false;
}
@@ -397,18 +397,18 @@ framebuffer_initialise(const char *fename, int width, int height, int bpp)
fbtype = nsfb_type_from_name(fename);
if (fbtype == NSFB_SURFACE_NONE) {
- LOG(("The %s surface is not available from libnsfb\n", fename));
+ LOG("The %s surface is not available from libnsfb\n", fename);
return NULL;
}
nsfb = nsfb_new(fbtype);
if (nsfb == NULL) {
- LOG(("Unable to create %s fb surface\n", fename));
+ LOG("Unable to create %s fb surface\n", fename);
return NULL;
}
if (nsfb_set_geometry(nsfb, width, height, fbfmt) == -1) {
- LOG(("Unable to set surface geometry\n"));
+ LOG("Unable to set surface geometry\n");
nsfb_free(nsfb);
return NULL;
}
@@ -416,7 +416,7 @@ framebuffer_initialise(const char *fename, int width, int height, int bpp)
nsfb_cursor_init(nsfb);
if (nsfb_init(nsfb) == -1) {
- LOG(("Unable to initialise nsfb surface\n"));
+ LOG("Unable to initialise nsfb surface\n");
nsfb_free(nsfb);
return NULL;
}
@@ -436,7 +436,7 @@ framebuffer_resize(nsfb_t *nsfb, int width, int height, int bpp)
}
if (nsfb_set_geometry(nsfb, width, height, fbfmt) == -1) {
- LOG(("Unable to change surface geometry\n"));
+ LOG("Unable to change surface geometry\n");
return false;
}