Skip to content

Commit 623deab

Browse files
committed
[lib][rr_graph] void casting undused parameter
1 parent 4faf21f commit 623deab

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

libs/librrgraph/src/io/rr_graph_reader.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ void load_rr_file(RRGraphBuilder* rr_graph_builder,
7373
bool do_check_rr_graph,
7474
bool echo_enabled,
7575
const char* echo_file_name,
76-
#ifdef VTR_ENABLE_CAPNPROTO
7776
const int route_verbosity,
78-
#else
79-
bool /*route_verbosity*/,
80-
#endif
8177
bool is_flat) {
8278
vtr::ScopedStartFinishTimer timer("Loading routing resource graph");
8379

@@ -100,6 +96,9 @@ void load_rr_file(RRGraphBuilder* rr_graph_builder,
10096
::capnp::Schema schema = ::capnp::Schema::from<ucap::RrGraph>();
10197
schema_file_id = schema.getProto().getScopeId();
10298
VTR_LOGV(route_verbosity > 1, "Schema file ID: 0x%016lx\n", schema_file_id);
99+
#else
100+
// Suppress the warning about unused variable 'route_verbosity'
101+
(void)route_verbosity;
103102
#endif
104103

105104
RrGraphSerializer reader(

libs/librrgraph/src/io/rr_graph_writer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ void write_rr_graph(RRGraphBuilder* rr_graph_builder,
3838
const char* file_name,
3939
bool echo_enabled,
4040
const char* echo_file_name,
41-
#ifdef VTR_ENABLE_CAPNPROTO
4241
const int route_verbosity,
43-
#else
44-
bool /*route_verbosity*/,
45-
#endif
4642
bool is_flat) {
4743

4844
// If Cap'n Proto is enabled, a unique ID is assigned to the schema used to serialize the RR graph.
@@ -54,6 +50,9 @@ void write_rr_graph(RRGraphBuilder* rr_graph_builder,
5450
::capnp::Schema schema = ::capnp::Schema::from<ucap::RrGraph>();
5551
schema_file_id = schema.getProto().getScopeId();
5652
VTR_LOGV(route_verbosity > 1, "Schema file ID: 0x%016lx\n", schema_file_id);
53+
#else
54+
// Suppress the warning about unused variable 'route_verbosity'
55+
(void)route_verbosity;
5756
#endif
5857

5958
RrGraphSerializer reader(

0 commit comments

Comments
 (0)