Skip to content
  • Jeff Hostetler's avatar
    config.mak.dev: disable suggest braces error on old clang versions · 54795d37
    Jeff Hostetler authored and Junio C Hamano's avatar Junio C Hamano committed
    Add the "-Wno-missing-braces" option when building with an old version
    of clang to suppress the "suggest braces around initialization" error
    in developer mode.
    
    For example, using an old version of clang gives the following errors
    (when in DEVELOPER=1 mode):
    
    $ make builtin/merge-file.o
        CC builtin/merge-file.o
    builtin/merge-file.c:29:23: error: suggest braces around initialization \
    			    of subobject [-Werror,-Wmissing-braces]
            mmfile_t mmfs[3] = { 0 };
                                 ^
                                 {}
    builtin/merge-file.c:31:20: error: suggest braces around initialization \
    			    of subobject [-Werror,-Wmissing-braces]
            xmparam_t xmp = { 0 };
                              ^
                              {}
    2 errors generated.
    
    This example compiles without error/warning with updated versions of
    clang.  Since this is an obsolete error, use the -Wno-missing-braces
    option to silence the warning when using an older c...
    54795d37