Web lists-archives.com

Re: [PATCH] worktree add: add --lock option




Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> -	unlink_or_warn(sb.buf);
> +	if (!ret && opts->keep_locked) {
> +		/*
> +		 * Don't keep the confusing "initializing" message
> +		 * after it's already over.
> +		 */
> +		truncate(sb.buf, 0);
> +	} else {
> +		unlink_or_warn(sb.buf);
> +	}

builtin/worktree.c: In function 'add_worktree':
builtin/worktree.c:314:11: error: ignoring return value of 'truncate', declared with attribute warn_unused_result [-Werror=unused-result]
   truncate(sb.buf, 0);
           ^
cc1: all warnings being treated as errors
make: *** [builtin/worktree.o] Error 1