Skip to content

Commit 27c277b

Browse files
committed
Fix errors found after cherry-pick
1 parent 16834f6 commit 27c277b

File tree

2 files changed

+41
-15
lines changed

2 files changed

+41
-15
lines changed

cli/neighbor.h

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,52 @@ void show()
1212
interface::dataPlane dataplane;
1313
const auto response = dataplane.neighbor_show();
1414

15-
FillAndPrintTable({"route_name",
16-
"interface_name",
17-
"ip_address",
18-
"mac_address"},
19-
response,
20-
{.optional_null = "static"});
15+
table_t table({.optional_null = "static"});
16+
table.insert("route_name",
17+
"interface_name",
18+
"ip_address",
19+
"mac_address");
20+
21+
for (const auto& [route_name,
22+
interface_name,
23+
ip_address,
24+
mac_address] : response)
25+
{
26+
table.insert(route_name,
27+
interface_name,
28+
ip_address,
29+
mac_address);
30+
}
31+
32+
table.print();
2133
}
2234

2335
void show_cache()
2436
{
2537
interface::dataPlane dataplane;
2638
const auto response = dataplane.neighbor_show_cache();
2739

28-
FillAndPrintTable({"interface_name",
29-
"ip_address",
30-
"mac_address",
31-
"last_update",
32-
"last_remove"},
33-
response,
34-
{.optional_null = "static"});
40+
table_t table({.optional_null = "static"});
41+
table.insert("interface_name",
42+
"ip_address",
43+
"mac_address",
44+
"last_update",
45+
"last_remove");
46+
47+
for (const auto& [interface_name,
48+
ip_address,
49+
mac_address,
50+
last_update,
51+
last_remove] : response)
52+
{
53+
table.insert(interface_name,
54+
ip_address,
55+
mac_address,
56+
last_update,
57+
last_remove);
58+
}
59+
60+
table.print();
3561
}
3662

3763
void insert(const std::string& route_name,

dataplane/neighbor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ bool module::resolve(const std::string& interface_name, const ipv6_address_t& ip
579579
generation_hashtable.update([this, key, value](neighbor::generation_hashtable& hashtable) {
580580
for (auto& [socket_id, hashtable_updater] : hashtable.hashtable_updater)
581581
{
582-
GCC_BUG_UNUSED(socket_id);
582+
(void)socket_id;
583583
if (!hashtable_updater.get_pointer()->insert_or_update(key, value))
584584
{
585585
stats.hashtable_insert_error++;
@@ -757,7 +757,7 @@ std::optional<std::string> module::GetInterfaceName(tInterfaceId iface_id)
757757
}
758758

759759
const auto& [it_route_name, it_interface_name] = it->second;
760-
GCC_BUG_UNUSED(it_route_name);
760+
(void)it_route_name;
761761

762762
return it_interface_name;
763763
}

0 commit comments

Comments
 (0)