• Gert Wollny's avatar
    configure.ac: Add CFLAG -Wno-missing-field-initializers (v5) · 81e5bf3c
    Gert Wollny authored
    This warning is misleading: When a struct is partially initialized without
    assigning to the structure members by name, then the remaining fields
    will be zeroed out, and this warning will be issued (if enabled). If, on the
    other hand, the partial initialization is done by assigning to named members,
    the remaining structure elements may hold random data, but the warning is not
    issued. Since in Mesa the first approach to initialize structure elements is
    used very often, and it is usually assumed that the remaining elements are
    zeroed out, heeding this warning would be counter-productive.
    
    v2: - add -Wno-missing-field-initializers to meson-build
        - fix empty line error
        (both Eric Engestrom)
    
    v3: * check for -Wmissing-field-initializers warning and then disable it
          because gcc and clang always accept -Wno-* (Dylan Baker)
        * Also disable this warning for C++
    
    v4: * meson.build add -Wno-missing-field-initializers to
          c_args instead of no_override_init_args (Eric Engstrom)
    
    v5: * configure.ac: Correct copy/paste error with CFLAGS/CXXFLAGS
    
    Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v2)
    Reviewed-by: default avatarEric Engestrom <eric.engestrom@intel.com>
    Signed-off-by: default avatarGert Wollny <gert.wollny@collabora.com>
    81e5bf3c
meson.build 44.3 KB