diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-10-09 13:17:34 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-10-09 13:17:34 +0000 |
commit | 8200c39fa90d9b3de3c18ec35fa46418aef52078 (patch) | |
tree | c9e68bf9adff83e6bfa6720ab94e6cd6f2846965 | |
parent | db5cfd5022007d2a794730695b9db08f17634674 (diff) | |
download | drakx-8200c39fa90d9b3de3c18ec35fa46418aef52078.tar drakx-8200c39fa90d9b3de3c18ec35fa46418aef52078.tar.gz drakx-8200c39fa90d9b3de3c18ec35fa46418aef52078.tar.bz2 drakx-8200c39fa90d9b3de3c18ec35fa46418aef52078.tar.xz drakx-8200c39fa90d9b3de3c18ec35fa46418aef52078.zip |
Hint compiler about unused arguments and don't make it yell in that case. As,
we do use -Werror along with -Wall stuff.
-rw-r--r-- | mdk-stage1/frontend.h | 8 | ||||
-rw-r--r-- | mdk-stage1/stdio-frontend.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mdk-stage1/frontend.h b/mdk-stage1/frontend.h index 4f2d112b7..3f58a3d3f 100644 --- a/mdk-stage1/frontend.h +++ b/mdk-stage1/frontend.h @@ -21,7 +21,13 @@ #include <stdarg.h> - +/* 'unused' atttribute, gcc specific and just to turn down some warnings. */ +#if defined __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif + enum return_type { RETURN_OK, RETURN_BACK, RETURN_ERROR }; void init_frontend(char * welcome_msg); diff --git a/mdk-stage1/stdio-frontend.c b/mdk-stage1/stdio-frontend.c index 3fbed999a..ea26bff14 100644 --- a/mdk-stage1/stdio-frontend.c +++ b/mdk-stage1/stdio-frontend.c @@ -330,7 +330,7 @@ enum return_type ask_yes_no(char *msg) } -enum return_type ask_from_entries(char *msg, char ** questions, char *** answers, int entry_size, void (*callback_func)(char ** strings)) +enum return_type ask_from_entries(char *msg, char ** questions, char *** answers, int entry_size, void (*callback_func)(char ** strings) UNUSED) { int j, i = 0; char ** already_answers = NULL; |