Skip to content

i am using -Wconditional-uninitialized flag and then i am getting some errrors from the library. #15865

@ananta-code

Description

@ananta-code

i am using -Wconditional-uninitialized flag and then i am getting some errrors from the library.

external/com_google_protobuf/src/google/protobuf/arena.cc:398:12: error: variable 'arena' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
return arena->AllocateAlignedWithCleanup(n, alloc_policy_.get());
^~~~~
external/com_google_protobuf/src/google/protobuf/arena.cc:395:21: note: initialize the variable 'arena' to silence this warning
SerialArena* arena;
^
= nullptr
1 error generated.

i want to filter out this error since it is coming from the library and i am using Bazel 5.0 and feature : build --features=external_include_paths but still i am seeing the above error from the library.

Could you please help me on this?

Originally posted by @ananta-code in #12009 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)team-Rules-CPPIssues for C++ rulestype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions