Page MenuHomePhabricator

[services] Tunnelbroker - Fix warnings during the AmqpManager build
ClosedPublic

Authored by max on Apr 25 2022, 3:04 AM.
Tags
None
Referenced Files
F3174966: D3830.diff
Thu, Nov 7, 7:21 PM
Unknown Object (File)
Sun, Nov 3, 2:54 PM
Unknown Object (File)
Sun, Nov 3, 2:54 PM
Unknown Object (File)
Sun, Nov 3, 2:54 PM
Unknown Object (File)
Sun, Nov 3, 2:54 PM
Unknown Object (File)
Sun, Nov 3, 2:54 PM
Unknown Object (File)
Sun, Nov 3, 2:51 PM
Unknown Object (File)
Fri, Oct 25, 12:06 AM

Details

Summary

Fixing small std::string conversion warnings during the build process:

AmqpManager.cpp:40:30: use of overloaded operator '=' is ambiguous (with operand types 'AMQP::AssociativeFieldProxy' (aka 'FieldProxy<AMQP::Table, basic_string<char, char_traits<char>, allocator<char>>>') and 'const size_t' (aka 'const unsigned long'))
[build]   arguments["x-message-ttl"] = AMQP_MESSAGE_TTL;
Test Plan

Run yarn run-tunnelbroker-service and successfully built the service without any warnings.

Diff Detail

Repository
rCOMM Comm
Branch
amqp-warnings-fix
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max edited the test plan for this revision. (Show Details)
max added reviewers: karol, tomek, varun.
max edited the summary of this revision. (Show Details)

Rebased on master.

services/tunnelbroker/src/Amqp/AmqpManager.cpp
63–69

where does get() come from?

tomek added 1 blocking reviewer(s): karol.

basically, this looks good but please respond, thanks.

This revision is now accepted and ready to land.Apr 27 2022, 11:57 PM

Removing .get() from this update.

max added inline comments.
services/tunnelbroker/src/Amqp/AmqpManager.cpp
63–69

where does get() come from?

It's from AMQP:: Table.
I've re-checked and I think it is redundant here and we can omit get() here.
The warning was related only when set AMQP::Table not about get it.
I've removed it as redundant.

Thanks for a fast review!