Skip to content

Commit 0ecc452

Browse files
committed
Fix compiler warning due to sign comparison
When compiling with -Werror, this causes the build to fail. Warning was: | yamux_frame.cpp:103:28: error: comparison of integers of different signs: 'gsl::span::index_type' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Werror,-Wsign-compare] | if (frame_bytes.size() < YamuxFrame::kHeaderLength) { | ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 parent 2149c87 commit 0ecc452

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/muxer/yamux/yamux_frame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ namespace libp2p::connection {
100100
}
101101

102102
boost::optional<YamuxFrame> parseFrame(gsl::span<const uint8_t> frame_bytes) {
103-
if (frame_bytes.size() < YamuxFrame::kHeaderLength) {
103+
if (frame_bytes.size() < static_cast<int>(YamuxFrame::kHeaderLength)) {
104104
return {};
105105
}
106106

0 commit comments

Comments
 (0)