From: Pavel Charvat Date: Sun, 26 Feb 2017 22:56:38 +0000 (+0100) Subject: Opt: Fixed compilation warnings in tests. X-Git-Tag: v6.5.2~2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=29d6cdbc6cbe44a25bbfb351f84116108a833366;p=libucw.git Opt: Fixed compilation warnings in tests. --- diff --git a/ucw/opt-test.c b/ucw/opt-test.c index 07fd6835..1ff0f6cf 100644 --- a/ucw/opt-test.c +++ b/ucw/opt-test.c @@ -14,7 +14,7 @@ #include #include -static void show_version(struct opt_item * opt UNUSED, const char * value UNUSED, void * data UNUSED) { +static void show_version(const struct opt_item * opt UNUSED, const char * value UNUSED, void * data UNUSED) { printf("This is a simple tea boiling console v0.1.\n"); exit(EXIT_SUCCESS); } @@ -56,7 +56,7 @@ static char * first_tea = NULL; #define MAX_TEA_COUNT 30 static char * tea_list[MAX_TEA_COUNT]; static int tea_num = 0; -static void add_tea(struct opt_item * opt UNUSED, const char * name, void * data) { +static void add_tea(const struct opt_item * opt UNUSED, const char * name, void * data) { char ** tea_list = data; if (tea_num >= MAX_TEA_COUNT) { fprintf(stderr, "Cannot boil more than %d teas.\n", MAX_TEA_COUNT); @@ -100,7 +100,7 @@ static struct cf_user_type teapot_temperature_t = { .dumper = (cf_dumper1*) teapot_temperature_dumper }; -static void opt_test_hook(struct opt_item * opt, uint event UNUSED, const char * value, void * data) { +static void opt_test_hook(const struct opt_item * opt, uint event UNUSED, const char * value, void * data) { if (!show_hooks) return; if (opt)