core/output.cpp: fix Clone.getWarnings()

Closes #3601.
Curiously the test introduced in 3af3afbf was passing on gcc even without this 'return'.
9 jobs for feature-a/3601-fix-getWarnings in 247 minutes and 59 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test Tools
passed #204861
test_tools

00:00:06

 
  Test Unit
passed #204862
test_algo_unit

00:03:21

 
  Test Functional
passed #204863
test_algo_should

00:15:35

 
  Test Shouldvdj
passed #204864
test_algo_shouldvdj

00:23:43

 
  Coverage
passed #204865
algo_coverage

00:00:06

89.1%
 
  Prepare Release
manual #204866
allowed to fail manual
prepare_release
 
  Valgrind Unit
passed #204867
valgrind
algo_valgrind_unit

00:08:51

 
  Valgrind Functional
canceled #204868
valgrind allowed to fail manual
algo_valgrind_functional

00:06:17

 
  Multiple Tests
passed #204869
several-compilers allowed to fail manual
test_various_compilers_manual

03:09:56