Remove compile warnings of tests under Ubuntu (return value ignored)