Skip to content

Commit c7c045a

Browse files
authored
Merge pull request #2830 from AlexandreSinger/feature-dangling-reference
[Warnings] Resolved Basic Warnings for GCC13
2 parents ec23fea + 35e3e40 commit c7c045a

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

libs/librrgraph/src/io/gen/rr_graph_uxsdcxx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4360,7 +4360,7 @@ inline void attr_error(std::bitset<N> astate, const char * const *lookup, const
43604360
}
43614361

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

43654365
if (!f) {
43664366
throw std::runtime_error(std::string("Failed to open file") + filename);

vpr/src/base/gen/vpr_constraints_uxsdcxx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ inline void attr_error(std::bitset<N> astate, const char* const* lookup, const s
12071207
}
12081208

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

12121212
if (!f) {
12131213
throw std::runtime_error(std::string("Failed to open file") + filename);

vpr/src/draw/draw_rr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,7 @@ void draw_get_rr_pin_coords(const t_rr_node& node, float* xcen, float* ycen, con
902902

903903
default:
904904
vpr_throw(VPR_ERROR_OTHER, __FILE__, __LINE__,
905-
"in draw_get_rr_pin_coords: Unexpected side %s.\n",
906-
TOTAL_2D_SIDE_STRINGS[pin_side]);
905+
"in draw_get_rr_pin_coords: Unexpected side.\n");
907906
break;
908907
}
909908

vpr/src/draw/search_bar.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ void search_and_highlight(GtkWidget* /*widget*/, ezgl::application* app) {
157157
warning_dialog_box("Invalid Net Name");
158158
return; //name not exist
159159
}
160-
for(auto clb_net_id: atom_ctx.lookup.clb_nets(atom_net_id).value()){
160+
161+
const auto clb_nets = atom_ctx.lookup.clb_nets(atom_net_id);
162+
for(auto clb_net_id: clb_nets.value()){
161163
highlight_nets(clb_net_id);
162164
}
163165
}
@@ -541,4 +543,4 @@ std::string get_search_type(ezgl::application* app) {
541543
return searchType;
542544
}
543545

544-
#endif /* NO_GRAPHICS */
546+
#endif /* NO_GRAPHICS */

0 commit comments

Comments
 (0)