]> git.ipfire.org Git - thirdparty/git.git/commit
parseopt: move definition of enum parse_opt_result up
authorRené Scharfe <l.s.r@web.de>
Tue, 20 Aug 2019 18:49:07 +0000 (20:49 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Aug 2019 19:37:30 +0000 (12:37 -0700)
commit19800bdc3f35fd0d0ab1bcef4dfa9ac69968288f
tree57761cddc9b16daa5bdc7d764670ff824c2bccd9
parentf7e68a08780e91d7c2f830f33457041407172b96
parseopt: move definition of enum parse_opt_result up

Define enum parse_opt_result before using it in a typedef.  This avoids
the following compiler warning:

   ./parse-options.h:53:14: error: ISO C forbids forward references to 'enum' types [-Werror,-Wpedantic]
   typedef enum parse_opt_result parse_opt_ll_cb(struct parse_opt_ctx_t *ctx,
                ^

While GCC and Clang both accept such a forward reference by default,
other compilers might be less forgiving.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.h