From abdfcb96811b9f0276b920bea8114fc82061d302 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 14 Sep 2021 22:49:04 -0500 Subject: [PATCH] fix: dead store warning in peer-msgs.cc (#1804) --- libtransmission/peer-msgs.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libtransmission/peer-msgs.cc b/libtransmission/peer-msgs.cc index 315bc5bba..bed9ad1db 100644 --- a/libtransmission/peer-msgs.cc +++ b/libtransmission/peer-msgs.cc @@ -1835,8 +1835,12 @@ static ReadState canRead(tr_peerIo* io, void* vmsgs, size_t* piece) break; default: - ret = READ_ERR; +#ifdef TR_ENABLE_ASSERTS TR_ASSERT_MSG(false, "unhandled peer messages state %d", (int)msgs->state); +#else + ret = READ_ERR; + break; +#endif } }