This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/16055] New: stdio-common/vfscanf.c:1760: possible bad if test ?


https://sourceware.org/bugzilla/show_bug.cgi?id=16055

            Bug ID: 16055
           Summary: stdio-common/vfscanf.c:1760: possible bad if test ?
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: dcb314 at hotmail dot com

Offending source code is

          if (__builtin_expect (wpsize == 0
                    && (flags & READ_POINTER)
                    && (width < 0 || width >= 0)

The static analyser "cppcheck" says

[glibc-2.18/stdio-common/vfscanf.c:1760]: (warning) Logical disjunction always
evaluates to true: width >= 0 || width < 0.

Maybe the test on width could be reworked ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]