PVS V739: EOF compared with a value of the char type.

Change-Id: Icfaff590359381fbdd3bbd7993dab92111da3ed1
Reviewed-on: https://review.haiku-os.org/c/1618
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Murai Takashi 2019-07-17 20:31:12 +09:00 committed by waddlesplash
parent 194c483884
commit 319c399d61
3 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ private:
status_t EachArgvPrivate(const char* name,
ArgvHandler argvHandlerFunc, void* passThru);
char GetCh();
int GetCh();
status_t SendArgv(ArgvHandler argvHandlerFunc, void* passThru);
// done with a whole line of argv, send it off and get ready

View File

@ -34,7 +34,7 @@ read_string(char* string, size_t bufferSize)
// TODO: setup timeout handler
// read everything until the next carriage return
char c;
int c;
while ((c = fgetc(stdin)) != EOF && c != '\r' && c != '\n') {
if (bufferSize > 1) {
string[0] = c;

View File

@ -153,7 +153,7 @@ ArgvParser::NextArgvIfNotEmpty()
}
char
int
ArgvParser::GetCh()
{
if (fPos < 0 || fBuffer[fPos] == 0) {
@ -185,7 +185,7 @@ ArgvParser::EachArgvPrivate(const char* name, ArgvHandler argvHandlerFunc,
status_t result;
for (;;) {
char ch = GetCh();
int ch = GetCh();
if (ch == EOF) {
// done with fFile
if (fInDoubleQuote || fInSingleQuote) {