This patch manually changes "return -1" and "return 0" statements that
weren't caught by the sed command.
These return statements fall into one of these criteria:
- misaligned line, which is then fixed by this patch;
- return at top level but inside block such as save_vars,
with_test_prefix, foreach, gdb_test_multiple.
Some weren't changed because they didn't meet the criteria above, or
weren't trivial to check.
---
gdb/testsuite/gdb.cp/anon-struct.exp | 2 +-
gdb/testsuite/gdb.cp/converts.exp | 2 +-
gdb/testsuite/gdb.cp/cp-relocate.exp | 8 ++++----
gdb/testsuite/gdb.cp/cpsizeof.exp | 2 +-
gdb/testsuite/gdb.cp/expand-psymtabs-cxx.exp | 4 ++--
gdb/testsuite/gdb.cp/fpointer.exp | 2 +-
gdb/testsuite/gdb.cp/koenig.exp | 2 +-
gdb/testsuite/gdb.cp/method2.exp | 2 +-
gdb/testsuite/gdb.cp/nsnested.exp | 2 +-
gdb/testsuite/gdb.cp/nsnoimports.exp | 2 +-
gdb/testsuite/gdb.cp/oranking.exp | 2 +-
gdb/testsuite/gdb.cp/pr10728.exp | 12 ++++++------
gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp | 2 +-
gdb/testsuite/gdb.cp/save-bp-qualified.exp | 4 ++--
gdb/testsuite/gdb.cp/smartp.exp | 2 +-
gdb/testsuite/gdb.cp/static-print-quit.exp | 2 +-
16 files changed, 26 insertions(+), 26 deletions(-)
@@ -18,11 +18,11 @@
# for types and functions within anonymous structures.
standard_testfile .cc
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
- return -1
+ return
}
# Clang doesn't add any names for functions within anonymous structures,
# so there is no way to try and refer to them inside GDB.
if {[test_compiler_info clang-*-* c++]} {
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .cc
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
- return -1
+ return
}
############################################
if {![runto_main]} {
@@ -19,12 +19,12 @@ standard_testfile .cc
append binfile .o
require allow_cplus_tests
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {c++ debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc get_func_address { func } {
global gdb_prompt hex
@@ -65,11 +65,11 @@ gdb_test_multiple "info functions func<.>" "info functions" {
-re "$gdb_prompt $" {
if { ${func1_name} != "" && ${func2_name} != "" } {
pass "info functions"
} else {
fail "info functions"
- return -1
+ return
}
}
}
# Check that all the functions have different addresses.
@@ -103,11 +103,11 @@ gdb_test_multiple "info file" "info file" {
-re "$gdb_prompt $" {
if { ${func1_sec} != "" && ${func2_sec} != "" } {
pass "info file"
} else {
fail "info file"
- return -1
+ return
}
}
}
if { $func1_sec == $func2_sec } {
@@ -17,11 +17,11 @@
standard_testfile .cc
require allow_cplus_tests
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] } {
- return -1
+ return
}
if {![runto_main]} {
perror "could not run to main"
return
@@ -17,12 +17,12 @@
standard_testfile .cc
set executable ${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug c++} ] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
clean_restart ${executable}
gdb_test_no_output "set language c++"
@@ -17,11 +17,11 @@
# complex expressions.
standard_testfile .cc
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -20,11 +20,11 @@ lappend opts debug
lappend opts c++
lappend opts additional_flags=-Wno-unused-comparison
lappend opts additional_flags=-std=c++11
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
- return -1
+ return
}
############################################
if {![runto_main]} {
@@ -21,11 +21,11 @@
require allow_cplus_tests
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .cc
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
- return -1
+ return
}
############################################
if {![runto_main]} {
return
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .cc
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
- return -1
+ return
}
############################################
if {![runto_main]} {
return
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .cc
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
- return -1
+ return
}
############################################
if {![runto_main]} {
@@ -26,22 +26,22 @@ include_file pr10728-x.h
set tfx [standard_output_file pr10728-x.o]
set tfy [standard_output_file pr10728-y.o]
if { [gdb_compile "${srcdir}/${subdir}/$srcfile2" "${tfy}.o" object {c++}] != "" } {
- untested "failed to compile second object file"
- return -1
+ untested "failed to compile second object file"
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/$srcfile" "${tfx}.o" object {debug c++}] != "" } {
- untested "failed to compile first object file"
- return -1
+ untested "failed to compile first object file"
+ return
}
if { [gdb_compile "${tfx}.o ${tfy}.o" ${binfile} executable {debug c++}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
clean_restart $::testfile
if {![runto_main]} {
@@ -20,11 +20,11 @@ standard_testfile .cc
require allow_cplus_tests
if {[prepare_for_testing ${testfile}.exp $testfile $srcfile \
{debug c++ additional_flags="-std=gnu++11"}] } {
- return -1
+ return
}
if {![runto_main]} {
perror "could not run to main"
return
@@ -36,11 +36,11 @@ proc restart {} {
return 1
}
with_test_prefix "save" {
if {![restart]} {
- return -1
+ return
}
gdb_breakpoint "function" qualified
gdb_breakpoint "function"
@@ -54,11 +54,11 @@ with_test_prefix "save" {
gdb_test "save breakpoint $bps" "" "save breakpoint bps"
}
with_test_prefix "restore" {
if {![restart]} {
- return -1
+ return
}
# Restore the breakpoints.
gdb_test "source $bps" "" "source bps"
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .cc
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
- return -1
+ return
}
############################################
if {![runto_main]} {
@@ -32,11 +32,11 @@ gdb_test_multiple "print c" "" {
pass $gdb_test_name
}
-re "\r\n$pagination_prompt$" {
# gdb-7.1 did not crash with this testcase but it had the same bug.
untested "bug does not reproduce"
- return 0
+ return
}
}
gdb_test "q" ".*"