From: Morgan Deters Date: Tue, 29 Apr 2014 22:14:34 +0000 (-0400) Subject: Revert a compiler warning fix from ea6a5a6. X-Git-Tag: cvc5-1.0.0~6949 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71e27a89c1500766c7d3da622192b6cf2f200d44;p=cvc5.git Revert a compiler warning fix from ea6a5a6. --- diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index 127365b78..88b43eb0e 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -372,8 +372,8 @@ std::string parseErrorHelper(const char* lineStart, int charPositionInLine, cons // likely it is also in original message? if so, very likely // we found the right place string word = slice.substr(caretPos, (caretPosOrig - caretPos + 1)); - unsigned messagePosSt = message.find(word); - unsigned messagePosEn = messagePosSt + (caretPosOrig - caretPos); + int messagePosSt = message.find(word); + int messagePosEn = messagePosSt + (caretPosOrig - caretPos); if( messagePosSt < string::npos && (messagePosSt == 0 || !isSimpleChar(message[messagePosSt-1]) ) && (messagePosEn+1 == message.size() || !isSimpleChar(message[messagePosEn+1]) ) ) { @@ -396,8 +396,8 @@ std::string parseErrorHelper(const char* lineStart, int charPositionInLine, cons } string word = slice.substr(nearestWordSt, (nearestWordEn - nearestWordSt + 1)); Debug("friendlyparser") << "[friendlyparser] nearest word = " << word << std::endl; - unsigned messagePosSt = message.find(word); - unsigned messagePosEn = messagePosSt + (nearestWordEn - nearestWordSt + 1); + int messagePosSt = message.find(word); + int messagePosEn = messagePosSt + (nearestWordEn - nearestWordSt + 1); if( messagePosSt < string::npos && (messagePosSt == 0 || !isSimpleChar(message[messagePosSt-1]) ) && (messagePosEn+1 == message.size() || !isSimpleChar(message[messagePosEn+1]) ) ) {