summaryrefslogtreecommitdiffhomepage
path: root/ir/libcore
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 20:30:48 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-14 07:36:54 +0200
commitf3272823b8e6e93bf3a7b5b04b1d98e299b79357 (patch)
treeac8a61c7f77a8c11dc8f73ad1bec8b95d7b719b5 /ir/libcore
parent01a34c279e122ebeb39130323a8d73e91f34b71e (diff)
Remove the unused parameter 'name' from option callbacks.
Diffstat (limited to 'ir/libcore')
-rw-r--r--ir/libcore/lc_opts.c13
-rw-r--r--ir/libcore/lc_opts.h2
-rw-r--r--ir/libcore/lc_opts_enum.c3
3 files changed, 7 insertions, 11 deletions
diff --git a/ir/libcore/lc_opts.c b/ir/libcore/lc_opts.c
index cc8034f..ddc917a 100644
--- a/ir/libcore/lc_opts.c
+++ b/ir/libcore/lc_opts.c
@@ -254,11 +254,8 @@ static char *strtolower(char *buf, size_t n, const char *str)
return buf;
}
-bool lc_opt_std_cb(const char *name, lc_opt_type_t type, void *data,
- size_t length, ...)
+bool lc_opt_std_cb(lc_opt_type_t type, void *data, size_t length, ...)
{
- (void)name;
-
va_list args;
va_start(args, length);
@@ -368,14 +365,14 @@ static bool lc_opt_occurs(lc_opt_entry_t *opt, const char *value)
case lc_opt_type_int: {
int val;
if (sscanf(value, "%i", &val))
- fine = s->cb(opt->name, s->type, s->value, s->length, val);
+ fine = s->cb(s->type, s->value, s->length, val);
break;
}
case lc_opt_type_double: {
double val;
if (sscanf(value, "%lf", &val))
- fine = s->cb(opt->name, s->type, s->value, s->length, val);
+ fine = s->cb(s->type, s->value, s->length, val);
break;
}
@@ -393,14 +390,14 @@ static bool lc_opt_occurs(lc_opt_entry_t *opt, const char *value)
}
if (fine)
- fine = s->cb(opt->name, s->type, s->value, s->length, val);
+ fine = s->cb(s->type, s->value, s->length, val);
break;
}
case lc_opt_type_string:
case lc_opt_type_enum:
- fine = s->cb(opt->name, s->type, s->value, s->length, value);
+ fine = s->cb(s->type, s->value, s->length, value);
break;
case lc_opt_type_invalid:
abort();
diff --git a/ir/libcore/lc_opts.h b/ir/libcore/lc_opts.h
index 1305f90..69678c6 100644
--- a/ir/libcore/lc_opts.h
+++ b/ir/libcore/lc_opts.h
@@ -32,7 +32,7 @@ typedef enum {
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 bool (lc_opt_callback_t)(lc_opt_type_t type, void *data, size_t length, ...);
typedef int (lc_opt_dump_t)(char *buf, size_t n, void *data);
diff --git a/ir/libcore/lc_opts_enum.c b/ir/libcore/lc_opts_enum.c
index b2c3130..e1415b0 100644
--- a/ir/libcore/lc_opts_enum.c
+++ b/ir/libcore/lc_opts_enum.c
@@ -14,7 +14,7 @@
static const char *delim = " \t|,";
#define DECL_CB(N, op) \
-bool lc_opt_enum_ ## N ## _cb(const char *name, lc_opt_type_t type, void *data, size_t len, ...) \
+bool lc_opt_enum_ ## N ## _cb(lc_opt_type_t type, void *data, size_t len, ...) \
{ \
lc_opt_enum_ ## N ## _var_t *var = (lc_opt_enum_ ## N ## _var_t*)data; \
const lc_opt_enum_ ## N ## _items_t *items = var->items; \
@@ -26,7 +26,6 @@ bool lc_opt_enum_ ## N ## _cb(const char *name, lc_opt_type_t type, void *data,
bool res = false; \
\
(void) len; \
- (void) name; \
(void) type; \
va_start(args, len); \
arg = va_arg(args, const char *); \