From f619546af9ed4abc3fdb7f18defddea2a4a1aba9 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Fri, 8 Nov 2013 18:50:02 +0100 Subject: [PATCH] wrlib: Marked args as unused for compiler The two functions require an argument which is used when the libXpm is used, which means having the same argument list for the builtin code to be permutable. This patch adds the appropriate stuff to avoid a false report from the compiler. Signed-off-by: Christophe CURIS --- wrlib/nxpm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wrlib/nxpm.c b/wrlib/nxpm.c index 3a146372..09371d1f 100644 --- a/wrlib/nxpm.c +++ b/wrlib/nxpm.c @@ -80,6 +80,12 @@ RImage *RGetImageFromXPMData(RContext * context, char **data) int bsize; int w, h, ccount, csize; + /* + * When using libXpm we need the context argument but the code here does + * not, so tell the compiler to not warn about it + */ + (void) context; + if (sscanf(data[line++], "%i %i %i %i", &w, &h, &ccount, &csize) != 4 || w <= 0 || h <= 0 || ccount <= 0 || csize <= 0) goto bad_format; @@ -242,6 +248,12 @@ RImage *RLoadXPM(RContext * context, const char *file) int w, h, ccount, csize; FILE *f; + /* + * When using libXpm we need the context argument but the code here does + * not, so tell the compiler to not warn about it + */ + (void) context; + f = fopen(file, "rb"); if (!f) { RErrorCode = RERR_OPEN;