Understanding how warnings on unused functions work