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

Closes #3601.
Curiously the test introduced in 3af3afbf was passing on gcc even without this 'return'.
1 job for 3601-fix-getWarnings in 6 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Test Tools
passed #204836
test_tools

00:00:06