Skip to content

Release builds shouldn't use -Werror #846

@davidgiven

Description

@davidgiven

On my platform, building head of git fails because of uninitialised variable warnings being treated as errors.

/home/dg/src/OpenShadingLanguage/src/liboslexec/lpeparse.cpp: In member function ‘OSL_v1_10::lpexp::LPexp* OSL_v1_10::Parser::parseSymbol()’:
/home/dg/src/OpenShadingLanguage/src/liboslexec/lpeparse.cpp:117:9: error: ‘iscustom’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         if (iscustom) {

Please don't use -Werror for release builds --- warnings aren't standardised between different compilers, which means that as people upgrade their compilers to have better analysis and more warnings, stuff randomly stops building. (In this case, iscustom is being initialised via an output variable in a function call; I bet what's happened is that gcc 7.2.0, which is what I have, has started taking into account the function implementation rather than just assuming that because iscustom is being passed by reference then it must be initialised.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions