mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-05 21:34:17 +01:00
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 <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
3b2362662e
commit
f619546af9
12
wrlib/nxpm.c
12
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;
|
||||
|
||||
Reference in New Issue
Block a user