Mailinglist Archive: opensuse-buildservice (89 mails)

< Previous Next >
Re: [opensuse-buildservice] Problem: testing for serious compiler warnings
  • From: Brüns, Stefan <Stefan.Bruens@xxxxxxxxxxxxxx>
  • Date: Fri, 19 Jan 2018 21:56:32 +0000
  • Message-id: <2100394.ulvTiTf8Rv@sbruens-linux>
On Freitag, 19. Januar 2018 20:08:10 CET Christian wrote:

when building I get:
[ 1703s] ... running 01-check-debuginfo
[ 1703s] ... testing for empty debuginfo packages
[ 1703s] ... running 02-check-gcc-output
[ 1703s] ... testing for serious compiler warnings
[ 1703s] (using /usr/lib/build/checks-data/check_gcc_output)
[ 1703s] (using /srv/oscbuild/openSUSE_42.3-x86_64/.build.log)
[ 1703s]
[ 1703s] I: Expression compares a char* pointer with a string literal.
[ 1703s] Usually a strcmp() was intended by the programmer
[ 1703s] E: palemoon stringcompare

I did report it upstream and got this:

AFAIK I am not a developer.
So who is right ?
wolfbeast or /usr/lib/build/checks-data/check_gcc_output

The author apparently lacks any C/C++ knowledge ...

5.13.5 String literals, paragraph 16
Evaluating a string-literal results in a string literal object with static
storage duration, initialized from the given characters as specified above.
Whether all string literals are distinct (that is, are stored in
nonoverlapping objects) and whether successive evaluations of a string-literal
yield the same or a different object is unspecified. [ Note: The effect of
attempting to modify a string literal is undefined. — end note ]

Note the "unspecified" in the paragraph above.

Kind regards,

< Previous Next >
Follow Ups