fix -Wunused-but-set warning