bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

src/bison/src/location.c:192: poor choice of type for local variable ?


From: David Binderman
Subject: src/bison/src/location.c:192: poor choice of type for local variable ?
Date: Wed, 23 Oct 2013 08:27:19 +0000

Hello there,

I just ran static analysis tool "cppcheck" over the source code
of the latest version of bison.

It said

[src/bison/src/location.c:192]: (warning) Storing getc() return value in char 
variable and then comparing with EOF.

Source code is

    char c = getc (caret_info.source);
    if (c != EOF)

The if test will always fail. Suggest change type of local variable c to int.

Regards

David Binderman                                           


reply via email to

[Prev in Thread] Current Thread [Next in Thread]