diff options
author | Slávek Banko <[email protected]> | 2020-08-12 20:36:42 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-08-12 20:39:01 +0200 |
commit | 1c08829a73a23fe3075afe733d54a0096b41722c (patch) | |
tree | 214d800f77a04ddd7c0553ad8edab34732f04a7f | |
parent | 93c6d3795f061cd93f255c8a3156d880be4bd84d (diff) | |
download | tdelibs-1c08829a73a23fe3075afe733d54a0096b41722c.tar.gz tdelibs-1c08829a73a23fe3075afe733d54a0096b41722c.zip |
Fix FTBFS due to unnamed unused arguments in C sources in a recent commit.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 1b2d3b15f4c84dc00c39376cfe892de2979f9d66)
-rw-r--r-- | tdeprint/driverparse.c | 2 | ||||
-rw-r--r-- | tdeprint/driverparse.h | 8 | ||||
-rw-r--r-- | tdeprint/lpr/make_driver_db_lpr.c | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/tdeprint/driverparse.c b/tdeprint/driverparse.c index 4f4cceb83..f6b7b3074 100644 --- a/tdeprint/driverparse.c +++ b/tdeprint/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/tdeprint/driverparse.h b/tdeprint/driverparse.h index 32c997f8c..68fb18078 100644 --- a/tdeprint/driverparse.h +++ b/tdeprint/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/tdeprint/lpr/make_driver_db_lpr.c b/tdeprint/lpr/make_driver_db_lpr.c index 13ca3263a..0d5f39c33 100644 --- a/tdeprint/lpr/make_driver_db_lpr.c +++ b/tdeprint/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; |