path: root/ir/libcore
diff options
authorChristoph Mallon <>2012-12-06 06:23:51 +0100
committerChristoph Mallon <>2012-12-06 06:23:51 +0100
commitf1faabdafa40558bab4d171999c7c4871dfee5a6 (patch)
tree1a30c5d9206f2e7f7c7eb001bd6dc12618d68d98 /ir/libcore
parent6cdf99e5db7c05eeaf7d6166037301941fa9cba4 (diff)
libcore: Check, that a pointer to a char array is passed to LC_OPT_ENT_STR().
Diffstat (limited to 'ir/libcore')
1 files changed, 2 insertions, 1 deletions
diff --git a/ir/libcore/lc_opts.h b/ir/libcore/lc_opts.h
index cf825ee..0dd6503 100644
--- a/ir/libcore/lc_opts.h
+++ b/ir/libcore/lc_opts.h
@@ -123,8 +123,9 @@ typedef struct {
#define LC_OPT_ENT_NEGBOOL(name, desc, addr) \
_LC_OPT_ENT(name, desc, lc_opt_type_negboolean, int, addr, 0, lc_opt_std_cb, lc_opt_std_dump, lc_opt_bool_dump_vals)
+typedef char lc_opt_str_t[];
#define LC_OPT_ENT_STR(name, desc, buf) \
- _LC_OPT_ENT(name, desc, lc_opt_type_string, char, buf, sizeof(buf), lc_opt_std_cb, lc_opt_std_dump, NULL)
+ _LC_OPT_ENT(name, desc, lc_opt_type_string, lc_opt_str_t, buf, sizeof(*buf), lc_opt_std_cb, lc_opt_std_dump, NULL)
#define LC_OPT_LAST \
_LC_OPT_ENT(NULL, NULL, lc_opt_type_invalid, void, NULL, 0, NULL, NULL, NULL)