Skip to content

Commit

Permalink
Merge pull request #2519 from AlexandreSinger/feature-remove-warnings
Browse files Browse the repository at this point in the history
[NO_GRAPHICS][Warnings] Resolved Unused Variables
  • Loading branch information
vaughnbetz authored Mar 28, 2024
2 parents 23535b0 + 4e2c0e4 commit 7df2340
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions vpr/src/draw/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ void init_graphics_state(bool show_graphics_val,
(void)route_type;
(void)save_graphics;
(void)graphics_commands;
(void)is_flat;
#endif // NO_GRAPHICS
}

Expand Down
3 changes: 3 additions & 0 deletions vpr/src/place/place.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1711,6 +1711,9 @@ static e_move_result try_swap(const t_annealing_state* state,
if (manual_move_enabled) {
#ifndef NO_GRAPHICS
create_move_outcome = manual_move_display_and_propose(manual_move_generator, blocks_affected, proposed_action.move_type, rlim, placer_opts, criticalities);
#else //NO_GRAPHICS
// Cast to void to explicitly avoid warning.
(void)manual_move_generator;
#endif //NO_GRAPHICS
} else if (router_block_move) {
// generate a move where two random router blocks are swapped
Expand Down
3 changes: 3 additions & 0 deletions vpr/src/route/route_utilization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ vtr::Matrix<float> calculate_routing_usage(t_rr_type rr_type, bool is_flat, bool
if (!draw_state->draw_layer_display[layer_num].visible)
continue; // don't count usage if layer is not visible
}
#else
// Cast to void to avoid warning.
(void)is_print;
#endif

if (rr_type == CHANX) {
Expand Down

0 comments on commit 7df2340

Please sign in to comment.