Skip to content

Commit 42509b0

Browse files
fix compilation warnings
1 parent 8d40d73 commit 42509b0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libs/libvtrutil/src/vtr_assert.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
*
104104
* Note that to avoid 'unused' variable warnings when assertions are
105105
* disabled, we pass the expr and msg to sizeof(). We use sizeof specifically
106-
* since it accepts expressions, and the C++ standard gaurentees sizeof's arguments
106+
* since it accepts expressions, and the C++ standard guarantees sizeof's arguments
107107
* are never evaluated (ensuring any expensive expressions are not evaluated when
108108
* assertions are disabled). To avoid warnings about the unused result of sizeof()
109109
* we cast it to void.
@@ -142,7 +142,7 @@ namespace assert {
142142
* function will never return. This should ensure the
143143
* compiler won't warn about detected conditions such as
144144
* dead-code or potential null pointer dereferences
145-
* which are gaurded against by assertions.
145+
* which are guarded against by assertions.
146146
*/
147147
[[noreturn]] void handle_assert(const char* expr, const char* file, unsigned int line, const char* function, const char* msg);
148148
} // namespace assert

vpr/src/place/net_cost_handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ double NetCostHandler::get_net_wirelength_from_layer_bb_(ClusterNetId net_id) co
14311431
const vtr::NdMatrixProxy<int, 1> net_layer_pin_sink_count = num_sink_pin_layer_[size_t(net_id)];
14321432

14331433
double ncost = 0.;
1434-
VTR_ASSERT_SAFE(bb.size() == g_vpr_ctx.device().grid.get_num_layers());
1434+
VTR_ASSERT_SAFE((int)bb.size() == g_vpr_ctx.device().grid.get_num_layers());
14351435

14361436
for (size_t layer_num = 0; layer_num < bb.size(); layer_num++) {
14371437
VTR_ASSERT_SAFE(net_layer_pin_sink_count[layer_num] != OPEN);

0 commit comments

Comments
 (0)