From: Junio C Hamano Date: Tue, 8 May 2018 06:59:21 +0000 (+0900) Subject: Merge branch 'nd/warn-more-for-devs' X-Git-Tag: v2.18.0-rc0~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e998e7a1880ce3939aa6f7ad4244ad319c1655d1;p=git Merge branch 'nd/warn-more-for-devs' The build procedure "make DEVELOPER=YesPlease" learned to enable a bit more warning options depending on the compiler used to help developers more. There also is "make DEVOPTS=tokens" knob available now, for those who want to help fixing warnings we usually ignore, for example. * nd/warn-more-for-devs: Makefile: add a DEVOPTS to get all of -Wextra Makefile: add a DEVOPTS to suppress -Werror under DEVELOPER Makefile: detect compiler and enable more warnings in DEVELOPER=1 connect.c: mark die_initial_contact() NORETURN --- e998e7a1880ce3939aa6f7ad4244ad319c1655d1 diff --cc Makefile index f89f2dba5b,1ad1049a40..4541788e50 --- a/Makefile +++ b/Makefile @@@ -442,28 -432,25 +442,48 @@@ all: # When cross-compiling, define HOST_CPU as the canonical name of the CPU on # which the built Git will run (for instance "x86_64"). # +# Define RUNTIME_PREFIX to configure Git to resolve its ancillary tooling and +# support files relative to the location of the runtime binary, rather than +# hard-coding them into the binary. Git installations built with RUNTIME_PREFIX +# can be moved to arbitrary filesystem locations. RUNTIME_PREFIX also causes +# Perl scripts to use a modified entry point header allowing them to resolve +# support files at runtime. +# +# When using RUNTIME_PREFIX, define HAVE_BSD_KERN_PROC_SYSCTL if your platform +# supports the KERN_PROC BSD sysctl function. +# +# When using RUNTIME_PREFIX, define PROCFS_EXECUTABLE_PATH if your platform +# mounts a "procfs" filesystem capable of resolving the path of the current +# executable. If defined, this must be the canonical path for the "procfs" +# current executable path. +# +# When using RUNTIME_PREFIX, define HAVE_NS_GET_EXECUTABLE_PATH if your platform +# supports calling _NSGetExecutablePath to retrieve the path of the running +# executable. +# +# When using RUNTIME_PREFIX, define HAVE_WPGMPTR if your platform offers +# the global variable _wpgmptr containing the absolute path of the current +# executable (this is the case on Windows). ++# + # Define DEVELOPER to enable more compiler warnings. Compiler version + # and family are auto detected, but could be overridden by defining + # COMPILER_FEATURES (see config.mak.dev) + # + # When DEVELOPER is set, DEVOPTS can be used to control compiler + # options. This variable contains keywords separated by + # whitespace. The following keywords are are recognized: + # + # no-error: + # + # suppresses the -Werror that implicitly comes with + # DEVELOPER=1. Useful for getting the full set of errors + # without immediately dying, or for logging them. + # + # extra-all: + # + # The DEVELOPER mode enables -Wextra with a few exceptions. By + # setting this flag the exceptions are removed, and all of + # -Wextra is used. GIT-VERSION-FILE: FORCE @$(SHELL_PATH) ./GIT-VERSION-GEN diff --cc connect.c index 54971166ac,49eca46462..b34dc80451 --- a/connect.c +++ b/connect.c @@@ -48,14 -46,8 +48,14 @@@ int check_ref_type(const struct ref *re return check_ref(ref->name, flags); } - static void die_initial_contact(int unexpected) + static NORETURN void die_initial_contact(int unexpected) { + /* + * A hang-up after seeing some response from the other end + * means that it is unexpected, as we know the other end is + * willing to talk to us. A hang-up before seeing any + * response does not necessarily mean an ACL problem, though. + */ if (unexpected) die(_("The remote end hung up upon initial contact")); else