aboutsummaryrefslogtreecommitdiffstats
path: root/list-objects-filter-options.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2022-11-29 13:26:44 +0100
committerJunio C Hamano <gitster@pobox.com>2022-11-30 10:00:35 +0900
commitd4f7036887f54184d666a1096ee96dfb2e9ad881 (patch)
tree8e849ad6bb095019b6e06449b97cd6a42bb11a6a /list-objects-filter-options.c
parent0d5448a554723acfb0d8bbb131e0583504dc7230 (diff)
downloadgit-d4f7036887f54184d666a1096ee96dfb2e9ad881.tar.gz
list-objects-filter: remove OPT_PARSE_LIST_OBJECTS_FILTER_INIT()
OPT_PARSE_LIST_OBJECTS_FILTER_INIT() with a non-NULL second argument passes a function pointer via an object pointer, which is undefined. It may work fine on platforms that implement C99 extension J.5.7 (Function pointer casts). Remove the unused macro and avoid the dependency on that extension. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects-filter-options.c')
-rw-r--r--list-objects-filter-options.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
index 5339660238..ee01bcd2cc 100644
--- a/list-objects-filter-options.c
+++ b/list-objects-filter-options.c
@@ -290,10 +290,6 @@ int opt_parse_list_objects_filter(const struct option *opt,
const char *arg, int unset)
{
struct list_objects_filter_options *filter_options = opt->value;
- opt_lof_init init = (opt_lof_init)opt->defval;
-
- if (init)
- filter_options = init(opt->value);
if (unset || !arg)
list_objects_filter_set_no_filter(filter_options);