From 85993dcc426775110ce60ee51feccea72622a523 Mon Sep 17 00:00:00 2001 From: "kevin.larke" Date: Thu, 16 Apr 2020 11:11:23 -0400 Subject: [PATCH] cwSpScBuf.cpp : Fixed signed/unsigned compare. --- cwSpScBuf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cwSpScBuf.cpp b/cwSpScBuf.cpp index 72b0f91..ddd007b 100644 --- a/cwSpScBuf.cpp +++ b/cwSpScBuf.cpp @@ -99,7 +99,7 @@ cw::rc_t cw::spsc_buf::copyIn( handle_t h, const void* iBuf, unsigned iN ) { // if there is space between w and the EOB to accept the write ... - if( iN <= e-w ) + if( iN <= (unsigned)(e-w) ) { n0 = iN; // fill the space after w @@ -122,7 +122,7 @@ cw::rc_t cw::spsc_buf::copyIn( handle_t h, const void* iBuf, unsigned iN ) } else // r > w : r is in front of w (the write will not split) { - if( iN < r - w ) + if( iN < (unsigned)(r - w) ) { n0 = iN; }