Warnings security

Tell the compiler to help us with security and portability.  Fix some errors detected this way.