-Wmemsize-comparison warning on clang

Jack Howarth <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CADtEn-16vTyZrNNC9WXZcynjUa6PLULpCTh+1E5vPeqyjYwqwg@mail.gmail.com>
The gdb-7.9 release produces a warning on clang for -Wmemsize-comparison of...

remote.c:5519:47: warning: size argument in 'strncmp' call is a
comparison [-Wmemsize-comparison]
              && strncmp (p, "core", strlen ("core") != 0))
                                     ~~~~~~~~~~~~~~~~^~~~
remote.c:5519:11: note: did you mean to compare the result of 'strncmp' instead?
              && strncmp (p, "core", strlen ("core") != 0))
                 ^                                       ~
                                                    )
remote.c:5519:31: note: explicitly cast the argument to size_t to
silence this warning
              && strncmp (p, "core", strlen ("core") != 0))
                                     ^
                                     (size_t)(           )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.