Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix compile warning on signed/unsigned comparison

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
  • Loading branch information...
commit ac4a79389ed3fd0a942c694b0a614e6b9fd032eb 1 parent 9d6ec7d
Gavin Halliday ghalliday authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 roxie/ccd/ccdserver.cpp
12 roxie/ccd/ccdserver.cpp
View
@@ -13555,7 +13555,7 @@ class CRoxieServerLoopActivity : public CRoxieServerActivity
protected:
IHThorLoopArg &helper;
ThorActivityKind activityKind;
- int maxIterations;
+ unsigned maxIterations;
bool finishedLooping;
unsigned flags;
bool eof;
@@ -13579,8 +13579,8 @@ class CRoxieServerLoopActivity : public CRoxieServerActivity
{
eof = false;
CRoxieServerActivity::start(parentExtractSize, parentExtract, paused);
- maxIterations = (int) helper.numIterations();
- if (maxIterations < 0) maxIterations = 0;
+ int iterations = (int) helper.numIterations();
+ maxIterations = (iterations >= 0) ? iterations : 0;
finishedLooping = ((activityKind == TAKloopcount) && (maxIterations == 0));
if ((flags & IHThorLoopArg::LFnewloopagain) && !helper.loopFirstTime())
finishedLooping = true;
@@ -14288,7 +14288,7 @@ class CRoxieServerGraphLoopActivity : public CRoxieServerActivity
{
protected:
IHThorGraphLoopArg &helper;
- int maxIterations;
+ unsigned maxIterations;
unsigned flags;
rtlRowBuilder GraphExtractBuilder;
unsigned loopGraphId;
@@ -14306,8 +14306,8 @@ class CRoxieServerGraphLoopActivity : public CRoxieServerActivity
virtual void start(unsigned parentExtractSize, const byte *parentExtract, bool paused)
{
CRoxieServerActivity::start(parentExtractSize, parentExtract, paused);
- maxIterations = (int) helper.numIterations();
- if (maxIterations < 0) maxIterations = 0;
+ int iterations = (int) helper.numIterations();
+ maxIterations = (iterations >= 0) ? iterations : 0;
if (maxIterations > maxGraphLoopIterations)
throw MakeStringException(ROXIE_TOO_MANY_GRAPH_LOOP, "Attempt to execute graph %u times", maxIterations);
if (maxIterations != 0)
Please sign in to comment.
Something went wrong with that request. Please try again.