libmisc/shell: Remove the need for -lm when linking from the ping command.

Remove the use of sqrt and so the need to link to -lm.
Clean up some warnings.