parse-options: fix SunCC compiler warning
commita92ec7efe0ad25f1c2047230c0324dcb54ce1cfc
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Tue, 11 Dec 2018 15:35:01 +0000 (11 16:35 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Dec 2018 08:21:33 +0000 (12 17:21 +0900)
tree0089c72cfbdf54da76582fc210048badce72071e
parent6da2d9595161441cbed1b1f579b8dd46970a8e20
parse-options: fix SunCC compiler warning

The compiler reports this because show_gitcomp() never actually
returns a value:

    "parse-options.c", line 520: warning: Function has no return
    statement : show_gitcomp

We could shut the compiler up. But instead let's not bury exit() too
deep. Do the same as internal -h handling, return a special error code
and handle the exit() in parse_options() (and other
parse_options_step() callers) instead.

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c
builtin/shortlog.c
builtin/update-index.c
parse-options.c
parse-options.h