summaryrefslogtreecommitdiffhomepage
path: root/ir/libcore
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 20:00:41 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-14 07:31:33 +0200
commit105fb01b3e9bba6f1a12f6f1378957509735bfef (patch)
tree1f46a50eddd51bada2778db89bcdbeebf3f20311 /ir/libcore
parent2381fbcafebf898c12e325b0914fb8f279f914b3 (diff)
Remove the unused parameter 'len' 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 ea94d1f..35cfeab 100644
--- a/ir/libcore/lc_opts.c
+++ b/ir/libcore/lc_opts.c
@@ -335,12 +335,11 @@ int lc_opt_std_dump(char *buf, size_t n, const char *name, lc_opt_type_t type, v
return res;
}
-int lc_opt_bool_dump_vals(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data, size_t length)
+int lc_opt_bool_dump_vals(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data)
{
(void)name;
(void)type;
(void)data;
- (void)length;
strncpy(buf, "true, false", n);
return n;
}
@@ -444,7 +443,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, ent->name, s->type, s->value, s->length);
+ s->dump_vals(buf, len, ent->name, s->type, s->value);
return buf;
}
diff --git a/ir/libcore/lc_opts.h b/ir/libcore/lc_opts.h
index 60d04aa..3b709d3 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, const char *name, lc_opt_type_t type, void *data, size_t length);
-typedef int (lc_opt_dump_vals_t)(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data, size_t length);
+typedef int (lc_opt_dump_vals_t)(char *buf, size_t n, const char *name, lc_opt_type_t type, 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 def5c86..e6efc1a 100644
--- a/ir/libcore/lc_opts_enum.c
+++ b/ir/libcore/lc_opts_enum.c
@@ -99,7 +99,7 @@ int lc_opt_enum_ ## N ## _dump(char *buf, size_t n, const char *name, lc_opt_typ
#define DECL_DUMP_VALS(T, N) \
-int lc_opt_enum_ ## N ## _dump_vals(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data, size_t len) \
+int lc_opt_enum_ ## N ## _dump_vals(char *buf, size_t n, const char *name, lc_opt_type_t type, 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; \
@@ -108,7 +108,6 @@ int lc_opt_enum_ ## N ## _dump_vals(char *buf, size_t n, const char *name, lc_op
size_t l = strlen(buf); \
(void) name; \
(void) type; \
- (void) len; \
\
if (l >= n) \
return (int)l; \