Re: [PATCH v3 3/6] worktree: add 'init-worktree-config' subcommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 28, 2021 at 4:32 PM Derrick Stolee via GitGitGadget
<gitgitgadget@xxxxxxxxx> wrote:
> [...]
> To help resolve this transition, create the 'git worktree
> init-worktree-config' helper. This new subcommand does the following:
> [...]

Like my not-a-proper-review of [6/6], this also is not a proper review...

> Signed-off-by: Derrick Stolee <dstolee@xxxxxxxxxxxxx>
> ---
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> @@ -1031,6 +1032,85 @@ static int repair(int ac, const char **av, const char *prefix)
> +static int init_worktree_config(int ac, const char **av, const char *prefix)
> +{
> +       struct config_set cs = { 0 };

On macOS with "Apple LLVM version 10.0.0 (clang-1000.10.44.4)" and
DEVELOPER=1, the above code breaks the build:

    builtin/worktree.c:1093:27: error: suggest braces around
    initialization of subobject [-Werror,-Wmissing-braces]
    struct config_set cs = { 0 };

It wants extra braces in the initializer. This fixes it:

    struct config_set cs = { { 0 } };



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux