Skip to content

protobuf/tests: Improve handling of descriptor library parse failures - #48108

Merged
phlax merged 2 commits into
envoyproxy:mainfrom
phlax:proto-warning
Nov 15, 2026
Merged

phlax merged 2 commits into
envoyproxy:mainfrom
phlax:proto-warning

Conversation

@phlax

@phlax phlax commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

fix following warning

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

@phlax phlax changed the title protobuf: Improve handling of descriptor library parse failures protobuf/tests: Improve handling of descriptor library parse failures Oct 8, 2026
@jwendell

jwendell commented Oct 8, 2026

Copy link
Copy Markdown
Member

I'm not sure what this does. Should an API maintainer be assigned?

@phlax

phlax commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

i think its pretty straightforward and test only - it prevents a warning emitted - this one

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

!file_descriptor_proto.ParseFromString(file_descriptor_bytes)) {
// Embedded descriptors are generated at build time; a failure here is a
// build bug, not a runtime condition. Skip rather than register garbage.
return;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the nodiscard warning, but the failure is still dropped silently. If this ever happens, the only symptom is a later "Could not find descriptor for: X" error, far from the real cause. The comment says this is a build bug, so could we report it here? An assert, or an ABSL_LOG(DFATAL), would make it loud in debug builds and still skip the bad descriptor in release.

Related: BuildFile() on L72 can also fail (it returns nullptr). It isn't nodiscard, so there's no warning, but it's the same silent-failure pattern. Worth handling the same way?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re BuildFile - wasnt sure but will add

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both now ABSL_LOG(DFATAL) (fatal in debug, skip in release), and BuildFile() returning nullptr is handled the same way. Covered by InvalidDescriptorsAreNotRegistered and the new UnbuildableDescriptorsAreNotRegistered.

!file_descriptor_proto.ParseFromString(file_descriptor_bytes)) {
// Embedded descriptors are generated at build time; a failure here is a
// build bug, not a runtime condition. Skip rather than register garbage.
return;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in text_format_transcoder.cc: the failure is skipped silently, and BuildFile() on L29 also ignores its result. It would be good to surface both.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same treatment here: parse/unescape and BuildFile() failures both ABSL_LOG(DFATAL).

0, 0,
absl::StrFormat("Could not parse dynamic message for: %s", message.GetTypeName()));
}
return nullptr;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes behavior for the main production caller. Envoy::createReflectableMessage() (source/common/protobuf/create_reflectable_message.cc) only checks the result with ASSERT, which is compiled out in release builds. A parse failure used to give a partly filled message; now release callers would dereference nullptr. Failing loudly is probably the right call, and this path should only fail if descriptors don't match. Could the PR description mention it, or could that caller handle nullptr explicitly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createReflectableMessage() now uses RELEASE_ASSERT rather than ASSERT, so release builds fail loudly instead of dereferencing nullptr. Also noted in the PR description.

@KBaichoo

Copy link
Copy Markdown
Contributor

/wait

pending comments being flushed

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label Nov 15, 2026
Log parse and build failures of embedded file descriptors with
ABSL_LOG(DFATAL), so they are fatal in debug builds and skipped in
release builds, and check the result of BuildFile().

createReflectableMessage() now RELEASE_ASSERTs on a null dynamic
message, as callers dereference it.

Signed-off-by: Ryan Northey <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the protobuf descriptor and dynamic-message error-handling changes.

No open issues 🎉

What changed in this PR

This PR improves failure handling in Envoy’s protobuf descriptor and dynamic-message helpers, addressing unchecked parse results and preventing failed conversions from returning partially parsed messages.

Changes:

  • Check descriptor decoding, parsing, and registration results, with diagnostics for failures.
  • Return null when dynamic-message parsing fails and enforce a release-mode assertion in the reflectable-message wrapper.
  • Add regression tests for invalid descriptors and message parse failures, with supporting test dependencies.
File Description
source/​common/​protobuf/​create_reflectable_message.cc Enforces non-null results in release builds.
api/​bazel/​cc_proto_descriptor_library/​text_format_transcoder.cc Checks descriptor decoding, parsing, and registration failures.
api/​bazel/​cc_proto_descriptor_library/​testdata/​text_format_transcoder_test.cc Tests invalid descriptors and subsequent valid registration.
api/​bazel/​cc_proto_descriptor_library/​testdata/​create_dynamic_message_test.cc Tests parse failures and error reporting.
api/​bazel/​cc_proto_descriptor_library/​testdata/​BUILD Adds dependencies needed by the new tests.
api/​bazel/​cc_proto_descriptor_library/​file_descriptor_info.cc Adds failure checks to the shared descriptor loader.
api/​bazel/​cc_proto_descriptor_library/​create_dynamic_message.cc Reports parse failures and returns null.

Review effort: Balanced

@phlax phlax removed the stale stalebot believes this issue/PR has not been touched recently label Nov 15, 2026
@phlax

phlax commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

/retest flakey android

@phlax
phlax enabled auto-merge (squash) November 15, 2026 21:14
@phlax
phlax merged commit 9c88f1c into envoyproxy:main Nov 15, 2026
27 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37): the test deps use this branch's
`@com_google_absl`.

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37): the test deps use this branch's
`@com_google_absl`.

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
…#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37): the test deps use this branch's
`@com_google_absl`.

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37): the test deps use this branch's
`@com_google_absl`.

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
…envoyproxy#48108)

fix following warning

```console

  INFO: From Compiling bazel/cc_proto_descriptor_library/text_format_transcoder.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/text_format_transcoder.cc:66:3: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     66 |   file_descriptor_proto.ParseFromString(file_descriptor_bytes);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  INFO: From Compiling bazel/cc_proto_descriptor_library/create_dynamic_message.cc:
  external/envoy_api+/bazel/cc_proto_descriptor_library/create_dynamic_message.cc:25:5: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
     25 |     dynamic_message->ParsePartialFromString(message.SerializePartialAsString());
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.

```

---------

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37): the test deps use this branch's
`@com_google_absl`.

(cherry picked from commit 9c88f1c)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants