Skip to content

Commit

Permalink
Merge pull request verilog-to-routing#2830 from AlexandreSinger/featu…
Browse files Browse the repository at this point in the history
…re-dangling-reference

[Warnings] Resolved Basic Warnings for GCC13
  • Loading branch information
vaughnbetz authored Nov 30, 2024
2 parents ec23fea + 35e3e40 commit c7c045a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/librrgraph/src/io/gen/rr_graph_uxsdcxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -4360,7 +4360,7 @@ inline void attr_error(std::bitset<N> astate, const char * const *lookup, const
}

inline void get_line_number(const char *filename, std::ptrdiff_t target_offset, int * line, int * col) {
std::unique_ptr<FILE,decltype(&fclose)> f(fopen(filename, "rb"), fclose);
std::unique_ptr<FILE,int(*)(FILE*)> f(fopen(filename, "rb"), fclose);

if (!f) {
throw std::runtime_error(std::string("Failed to open file") + filename);
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/base/gen/vpr_constraints_uxsdcxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ inline void attr_error(std::bitset<N> astate, const char* const* lookup, const s
}

inline void get_line_number(const char* filename, std::ptrdiff_t target_offset, int* line, int* col) {
std::unique_ptr<FILE, decltype(&fclose)> f(fopen(filename, "rb"), fclose);
std::unique_ptr<FILE,int(*)(FILE*)> f(fopen(filename, "rb"), fclose);

if (!f) {
throw std::runtime_error(std::string("Failed to open file") + filename);
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/draw/draw_rr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,7 @@ void draw_get_rr_pin_coords(const t_rr_node& node, float* xcen, float* ycen, con

default:
vpr_throw(VPR_ERROR_OTHER, __FILE__, __LINE__,
"in draw_get_rr_pin_coords: Unexpected side %s.\n",
TOTAL_2D_SIDE_STRINGS[pin_side]);
"in draw_get_rr_pin_coords: Unexpected side.\n");
break;
}

Expand Down
6 changes: 4 additions & 2 deletions vpr/src/draw/search_bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ void search_and_highlight(GtkWidget* /*widget*/, ezgl::application* app) {
warning_dialog_box("Invalid Net Name");
return; //name not exist
}
for(auto clb_net_id: atom_ctx.lookup.clb_nets(atom_net_id).value()){

const auto clb_nets = atom_ctx.lookup.clb_nets(atom_net_id);
for(auto clb_net_id: clb_nets.value()){
highlight_nets(clb_net_id);
}
}
Expand Down Expand Up @@ -541,4 +543,4 @@ std::string get_search_type(ezgl::application* app) {
return searchType;
}

#endif /* NO_GRAPHICS */
#endif /* NO_GRAPHICS */

0 comments on commit c7c045a

Please sign in to comment.