]> git.ipfire.org Git - thirdparty/git.git/commit
parse-options: adjust `parse_opt_unknown_cb()`s declared return type
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 13 May 2019 22:43:17 +0000 (15:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 May 2019 07:42:31 +0000 (16:42 +0900)
commit567fce1e10e77b39203504ad36a273d447ec031a
treee6d3924c59ca8f03b9238607881e450a080111e4
parentab15ad1a3b4b04a29415aef8c9afa2f64fc194a2
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>
parse-options.h