Page MenuHomePhabricator

Fix a -Wreturn-type warning with GCC
ClosedPublic

Authored by Fabien on Jan 4 2023, 15:24.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABCb19d99828848: Fix a -Wreturn-type warning with GCC
Summary

The RPCArg::ToStringObj method is supposed to return a string, but in the case of an unused type conversion it will raise an error and not return anything.

Test Plan

With GCC 12:

ninja

Check the warning is gone.

Diff Detail

Event Timeline

Fabien requested review of this revision.Jan 4 2023, 15:24
sdulfari requested changes to this revision.Jan 4 2023, 21:28
sdulfari added a subscriber: sdulfari.

Although we don't expect this code to execute, it should at least appear sane if it did.

src/rpc/util.cpp
952
This revision now requires changes to proceed.Jan 4 2023, 21:28

Return unknown when the type is unknown

This revision is now accepted and ready to land.Jan 5 2023, 17:27
This revision was automatically updated to reflect the committed changes.