From: Christophe CURIS <christophe.cu...@free.fr>

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 <christophe.cu...@free.fr>
---
 wrlib/nxpm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/wrlib/nxpm.c b/wrlib/nxpm.c
index 3a14637..09371d1 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;
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to