diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-08-12 20:36:42 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-03 22:36:36 +0100 |
commit | 75aaa51fe2d63a0258522ca44b88215093893c6e (patch) | |
tree | 2b18515d73f7d7690033d5cf08d5fd8ce1fbd82b | |
parent | e83b6fdca00dbf4a3b194c29bcc5c22e381f16db (diff) | |
download | tdelibs-75aaa51fe2d63a0258522ca44b88215093893c6e.tar.gz tdelibs-75aaa51fe2d63a0258522ca44b88215093893c6e.zip |
Fix FTBFS due to unnamed unused arguments in C sources in a recent commit.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 1b2d3b15f4c84dc00c39376cfe892de2979f9d66)
-rw-r--r-- | kdeprint/driverparse.c | 2 | ||||
-rw-r--r-- | kdeprint/driverparse.h | 8 | ||||
-rw-r--r-- | kdeprint/lpr/make_driver_db_lpr.c | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/kdeprint/driverparse.c b/kdeprint/driverparse.c index 7d6462761..b9c2170d5 100644 --- a/kdeprint/driverparse.c +++ b/kdeprint/driverparse.c @@ -280,7 +280,7 @@ int getMaticPrinterInfos(const char *base, const char *id, char *make, char *mod return 1; } -int parseMaticFile(const char *driver, const char * /*origin*/, const char * /*metadata*/, FILE *output) +int parseMaticFile(const char *driver, const char * UNUSED(origin), const char * UNUSED(metadata), FILE *output) { FILE *drFile; char name[32] = {0}, diff --git a/kdeprint/driverparse.h b/kdeprint/driverparse.h index 0fa632fd7..b6dba8f51 100644 --- a/kdeprint/driverparse.h +++ b/kdeprint/driverparse.h @@ -23,6 +23,14 @@ #include <stdio.h> +#if !defined(UNUSED) +# if defined(__GNUC__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) ) +# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__)) +# else +# define UNUSED(x) UNUSED_ ## x +# endif +#endif + void registerHandler(const char *name, void(*initf)(const char*), int(*parsef)(const char*, const char*, const char*, FILE*)); void initFoomatic(void); int execute(int argc, char *argv[]); diff --git a/kdeprint/lpr/make_driver_db_lpr.c b/kdeprint/lpr/make_driver_db_lpr.c index b6f3f171b..f73babbe2 100644 --- a/kdeprint/lpr/make_driver_db_lpr.c +++ b/kdeprint/lpr/make_driver_db_lpr.c @@ -47,7 +47,7 @@ void simplifyModel(const char *modelname) } } -int parseApsFile(const char *filename, const char * /*origin*/, const char * /*metadata*/, FILE *output) +int parseApsFile(const char *filename, const char * UNUSED(origin), const char * UNUSED(metadata), FILE *output) { FILE *apsfile; char buf[256], modelname[256]; @@ -127,7 +127,7 @@ char* nextWord(char *c) return d; } -int parseIfhpFile(const char *filename, const char * /*origin*/, const char * /*metadata*/, FILE *output) +int parseIfhpFile(const char *filename, const char * UNUSED(origin), const char * UNUSED(metadata), FILE *output) { char buf[1024]; FILE *in; |