From a59f82093af743453c89db638d8f1016722d3a7e Mon Sep 17 00:00:00 2001 From: Brenton Bostick <bostick@gmail.com> Date: Tue, 17 Jan 2023 11:38:10 -0600 Subject: [PATCH] Fix Possible misuse of comma operator here (#1851) Xcode warns about "Possible misuse of comma operator here". Comma is a sequencing operator in C++ and original code does work, but is highly non-idiomatic. --- node/Packet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/node/Packet.cpp b/node/Packet.cpp index 3bdeaf9e9..d9378cc5e 100644 --- a/node/Packet.cpp +++ b/node/Packet.cpp @@ -605,7 +605,11 @@ _next_match: *token += ML_MASK; matchCode -= ML_MASK; LZ4_write32(op, 0xFFFFFFFF); - while (matchCode >= 4*255) op+=4, LZ4_write32(op, 0xFFFFFFFF), matchCode -= 4*255; + while (matchCode >= 4*255) { + op+=4; + LZ4_write32(op, 0xFFFFFFFF); + matchCode -= 4*255; + } op += matchCode / 255; *op++ = (BYTE)(matchCode % 255); } else