Subject: Re: [PATCH 70/76] diff.c: convert --inter-hunk-context

From: SZEDER Gábor <[email-masked]>
Date: Sat, 19 Jan 2019 02:18:34 +0100

On Thu, Jan 17, 2019 at 08:06:09PM +0700, Nguyễn Thái Ngọc Duy wrote:
> Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
> ---
>  diff.c          | 6 +++---
>  parse-options.h | 3 ++-
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/diff.c b/diff.c
> index 3e7c36524d..cc10b27df0 100644
> --- a/diff.c
> +++ b/diff.c

> @@ -5503,9 +5506,6 @@ int diff_opt_parse(struct diff_options *options,
>  	}
>  
>  	/* misc options */
> -	else if (opt_arg(arg, '\0', "inter-hunk-context",
> -			 &options->interhunkcontext))
> -		;

This hunk removes the last remaining callsite of the static opt_arg()
function:

  diff.c:4581:12: error: ‘opt_arg’ defined but not used [-Werror=unused-function]
   static int opt_arg(const char *arg, int arg_short, const char *arg_long, int *val)
              ^
  cc1: all warnings being treated as errors

>  	else
>  		return 0;
>  	return 1;