summaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-05-13 22:43:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-14 07:42:31 (GMT)
commit567fce1e10e77b39203504ad36a273d447ec031a (patch)
treee6d3924c59ca8f03b9238607881e450a080111e4 /parse-options.h
parentab15ad1a3b4b04a29415aef8c9afa2f64fc194a2 (diff)
downloadgit-567fce1e10e77b39203504ad36a273d447ec031a.zip
git-567fce1e10e77b39203504ad36a273d447ec031a.tar.gz
git-567fce1e10e77b39203504ad36a273d447ec031a.tar.bz2
parse-options: adjust `parse_opt_unknown_cb()`s declared return type
In f41179f16ba2 (parse-options: avoid magic return codes, 2019-01-27), the signature of the low-level parse-opt callback function was changed to return an `enum`. And while the implementations were changed, one declaration was left unchanged, still claiming to return `int`. This can potentially lead to problems, as compilers are free to choose any integral type for an `enum` as long as it can represent all declared values. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse-options.h b/parse-options.h
index bd00cf0..cd75683 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -286,7 +286,9 @@ int parse_opt_commit(const struct option *, const char *, int);
int parse_opt_tertiary(const struct option *, const char *, int);
int parse_opt_string_list(const struct option *, const char *, int);
int parse_opt_noop_cb(const struct option *, const char *, int);
-int parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx, const struct option *, const char *, int);
+enum parse_opt_result parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx,
+ const struct option *,
+ const char *, int);
int parse_opt_passthru(const struct option *, const char *, int);
int parse_opt_passthru_argv(const struct option *, const char *, int);