Fix some issues found with clang

These are all pretty simple.  I started playing with clang's static analisys and there are about 40 more.  I'll keep plugging away at them.  Let me know if I did this right and or if you want me to do something different.

Thanks,

Kent