aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-open.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2020-06-26 14:53:28 +0100
committerGary Benson <gbenson@redhat.com>2020-06-26 14:53:28 +0100
commitf53b3eeb677aace413d45b4b3c9d23d57d7167fc (patch)
treec603ca7a67446c6ba38b29e3dec3a10c9a5cdb12 /libctf/ctf-open.c
parentedf92af0fbc064243069578353ff569462c3df5b (diff)
downloadgdb-f53b3eeb677aace413d45b4b3c9d23d57d7167fc.zip
gdb-f53b3eeb677aace413d45b4b3c9d23d57d7167fc.tar.gz
gdb-f53b3eeb677aace413d45b4b3c9d23d57d7167fc.tar.bz2
Fix -Wstring-compare testcase build failure
Clang fails to compile the file gdb/testsuite/gdb.cp/try_catch.cc with the following error: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare] This commit fixes the error, replacing the pointer comparison with a call to strcmp. This commit also adds a final check: the test program is run to the final return statement, and the value of "test" is checked to ensure it is still "true" at that point. gdb/testsuite/ChangeLog: * gdb.cp/try_catch.cc: Include string.h. (main): Replace comparison against string literal with strcmp, avoiding build failure with -Wstring-compare. Add "marker test-complete". * gdb.cp/try_catch.exp: Run the test to the above marker, then verify that the value of "test" is still true.
Diffstat (limited to 'libctf/ctf-open.c')
0 files changed, 0 insertions, 0 deletions