summaryrefslogtreecommitdiffhomepage
path: root/ir/libcore
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 20:03:20 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-14 07:32:15 +0200
commit36e4570949550704dc766de4b2d35cf8b048c932 (patch)
treebf2766ec1fdad78134bb9a5f8df74ad722079257 /ir/libcore
parent105fb01b3e9bba6f1a12f6f1378957509735bfef (diff)
Remove the unused parameter 'len' from option 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 35cfeab..9ef8451 100644
--- a/ir/libcore/lc_opts.c
+++ b/ir/libcore/lc_opts.c
@@ -299,10 +299,9 @@ bool lc_opt_std_cb(const char *name, lc_opt_type_t type, void *data,
return res;
}
-int lc_opt_std_dump(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data, size_t length)
+int lc_opt_std_dump(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data)
{
(void)name;
- (void)length;
int res;
if (data) {
@@ -432,7 +431,7 @@ static char *lc_opt_value_to_string(char *buf, size_t len, const lc_opt_entry_t
{
const lc_opt_special_t *s = lc_get_opt_special(ent);
if (s->dump)
- s->dump(buf, len, ent->name, s->type, s->value, s->length);
+ s->dump(buf, len, ent->name, s->type, s->value);
else
strncpy(buf, "<n/a>", len);
return buf;
diff --git a/ir/libcore/lc_opts.h b/ir/libcore/lc_opts.h
index 3b709d3..1577ee5 100644
--- a/ir/libcore/lc_opts.h
+++ b/ir/libcore/lc_opts.h
@@ -34,7 +34,7 @@ typedef struct lc_opt_entry_t lc_opt_entry_t;
typedef bool (lc_opt_callback_t)(const char *name, lc_opt_type_t type, void *data, size_t length, ...);
-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_t)(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data);
typedef int (lc_opt_dump_vals_t)(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data);
diff --git a/ir/libcore/lc_opts_enum.c b/ir/libcore/lc_opts_enum.c
index e6efc1a..cf42bfa 100644
--- a/ir/libcore/lc_opts_enum.c
+++ b/ir/libcore/lc_opts_enum.c
@@ -64,7 +64,7 @@ DECL_CB(const_ptr, =)
DECL_CB(func_ptr, =)
#define DECL_DUMP(T, N, cond) \
-int lc_opt_enum_ ## N ## _dump(char *buf, size_t n, const char *name, lc_opt_type_t type, void *data, size_t len) \
+int lc_opt_enum_ ## N ## _dump(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; \
@@ -74,7 +74,6 @@ int lc_opt_enum_ ## N ## _dump(char *buf, size_t n, const char *name, lc_opt_typ
size_t l = strlen(buf); \
(void) name; \
(void) type; \
- (void) len; \
\
if (l >= n) \
return (int)l; \