summaryrefslogtreecommitdiffhomepage
path: root/ir/libcore
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 20:14:05 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-14 07:34:17 +0200
commitb9b382bbe02448f39adbf5f60e33f9d0ccc6a148 (patch)
treee0a313c793b009e64467b94ad0f73f6cd397b197 /ir/libcore
parent9c15b1269070281a42e476dacee627627cc55211 (diff)
Remove the unused parameter 'type' from option value dumpers.
Diffstat (limited to 'ir/libcore')
-rw-r--r--ir/libcore/lc_opts.c5
-rw-r--r--ir/libcore/lc_opts.h2
-rw-r--r--ir/libcore/lc_opts_enum.c3
3 files changed, 4 insertions, 6 deletions
diff --git a/ir/libcore/lc_opts.c b/ir/libcore/lc_opts.c
index 60f3ebc..3f34d95 100644
--- a/ir/libcore/lc_opts.c
+++ b/ir/libcore/lc_opts.c
@@ -332,9 +332,8 @@ int lc_opt_std_dump(char *buf, size_t n, lc_opt_type_t type, void *data)
return res;
}
-int lc_opt_bool_dump_vals(char *buf, size_t n, lc_opt_type_t type, void *data)
+int lc_opt_bool_dump_vals(char *buf, size_t n, void *data)
{
- (void)type;
(void)data;
strncpy(buf, "true, false", n);
return n;
@@ -439,7 +438,7 @@ static char *lc_opt_values_to_string(char *buf, size_t len,
{
const lc_opt_special_t *s = lc_get_opt_special(ent);
if (s->dump_vals)
- s->dump_vals(buf, len, s->type, s->value);
+ s->dump_vals(buf, len, s->value);
return buf;
}
diff --git a/ir/libcore/lc_opts.h b/ir/libcore/lc_opts.h
index d75333c..1be99d0 100644
--- a/ir/libcore/lc_opts.h
+++ b/ir/libcore/lc_opts.h
@@ -36,7 +36,7 @@ typedef bool (lc_opt_callback_t)(const char *name, lc_opt_type_t type, void *dat
typedef int (lc_opt_dump_t)(char *buf, size_t n, lc_opt_type_t type, void *data);
-typedef int (lc_opt_dump_vals_t)(char *buf, size_t n, lc_opt_type_t type, void *data);
+typedef int (lc_opt_dump_vals_t)(char *buf, size_t n, void *data);
typedef struct {
const char *name; /**< The name of the option. */
diff --git a/ir/libcore/lc_opts_enum.c b/ir/libcore/lc_opts_enum.c
index 1de9471..69b7c99 100644
--- a/ir/libcore/lc_opts_enum.c
+++ b/ir/libcore/lc_opts_enum.c
@@ -97,14 +97,13 @@ int lc_opt_enum_ ## N ## _dump(char *buf, size_t n, lc_opt_type_t type, void *da
#define DECL_DUMP_VALS(T, N) \
-int lc_opt_enum_ ## N ## _dump_vals(char *buf, size_t n, lc_opt_type_t type, void *data) \
+int lc_opt_enum_ ## N ## _dump_vals(char *buf, size_t n, void *data) \
{ \
lc_opt_enum_ ## N ## _var_t *var = (lc_opt_enum_ ## N ## _var_t*) data; \
const lc_opt_enum_ ## N ## _items_t *items = var->items; \
const char *prefix = ""; \
int i; \
size_t l = strlen(buf); \
- (void) type; \
\
if (l >= n) \
return (int)l; \