Skip to content

Commit 2349f3e

Browse files
committed
vpr: Fix compilation warnings
1 parent 7a58e3a commit 2349f3e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

vpr/src/pack/cluster.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,8 +1792,10 @@ static void update_cluster_stats(t_pack_molecule *molecule,
17921792
}
17931793

17941794
// if this molecule came from the transitive fanout candidates remove it
1795-
cb->pb_stats->transitive_fanout_candidates.erase(molecule);
1796-
cb->pb_stats->explore_transitive_fanout = true;
1795+
if (cb) {
1796+
cb->pb_stats->transitive_fanout_candidates.erase(molecule);
1797+
cb->pb_stats->explore_transitive_fanout = true;
1798+
}
17971799
}
17981800

17991801
static void start_new_cluster(

vpr/src/route/rr_graph_reader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ void process_rr_node_indices(const DeviceGrid& grid) {
771771
for (int iy = node.ylow(); iy <= node.yhigh(); iy++) {
772772
for (int ix = node.xlow(); ix <= node.xhigh(); ix++) {
773773
count = node.ptc_num();
774-
if(count >= indices[CHANX][iy][ix][0].size()) {
774+
if(count >= int(indices[CHANX][iy][ix][0].size())) {
775775
VPR_THROW(VPR_ERROR_ROUTE,
776776
"Ptc index %d for CHANX (%d, %d) is out of bounds, size = %zu",
777777
count, ix, iy, indices[CHANX][iy][ix][0].size());
@@ -783,7 +783,7 @@ void process_rr_node_indices(const DeviceGrid& grid) {
783783
for (int ix = node.xlow(); ix <= node.xhigh(); ix++) {
784784
for (int iy = node.ylow(); iy <= node.yhigh(); iy++) {
785785
count = node.ptc_num();
786-
if(count >= indices[CHANY][ix][iy][0].size()) {
786+
if(count >= int(indices[CHANY][ix][iy][0].size())) {
787787
VPR_THROW(VPR_ERROR_ROUTE,
788788
"Ptc index %d for CHANY (%d, %d) is out of bounds, size = %zu",
789789
count, ix, iy, indices[CHANY][ix][iy][0].size());

0 commit comments

Comments
 (0)