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 <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
194c483884
commit
319c399d61
@@ -71,7 +71,7 @@ private:
|
|||||||
|
|
||||||
status_t EachArgvPrivate(const char* name,
|
status_t EachArgvPrivate(const char* name,
|
||||||
ArgvHandler argvHandlerFunc, void* passThru);
|
ArgvHandler argvHandlerFunc, void* passThru);
|
||||||
char GetCh();
|
int GetCh();
|
||||||
|
|
||||||
status_t SendArgv(ArgvHandler argvHandlerFunc, void* passThru);
|
status_t SendArgv(ArgvHandler argvHandlerFunc, void* passThru);
|
||||||
// done with a whole line of argv, send it off and get ready
|
// done with a whole line of argv, send it off and get ready
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ read_string(char* string, size_t bufferSize)
|
|||||||
// TODO: setup timeout handler
|
// TODO: setup timeout handler
|
||||||
|
|
||||||
// read everything until the next carriage return
|
// read everything until the next carriage return
|
||||||
char c;
|
int c;
|
||||||
while ((c = fgetc(stdin)) != EOF && c != '\r' && c != '\n') {
|
while ((c = fgetc(stdin)) != EOF && c != '\r' && c != '\n') {
|
||||||
if (bufferSize > 1) {
|
if (bufferSize > 1) {
|
||||||
string[0] = c;
|
string[0] = c;
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ ArgvParser::NextArgvIfNotEmpty()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char
|
int
|
||||||
ArgvParser::GetCh()
|
ArgvParser::GetCh()
|
||||||
{
|
{
|
||||||
if (fPos < 0 || fBuffer[fPos] == 0) {
|
if (fPos < 0 || fBuffer[fPos] == 0) {
|
||||||
@@ -185,7 +185,7 @@ ArgvParser::EachArgvPrivate(const char* name, ArgvHandler argvHandlerFunc,
|
|||||||
status_t result;
|
status_t result;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char ch = GetCh();
|
int ch = GetCh();
|
||||||
if (ch == EOF) {
|
if (ch == EOF) {
|
||||||
// done with fFile
|
// done with fFile
|
||||||
if (fInDoubleQuote || fInSingleQuote) {
|
if (fInDoubleQuote || fInSingleQuote) {
|
||||||
|
|||||||
Reference in New Issue
Block a user