Small fixes for warnings found with Clang's scan-build

Hi, I compiled stock PolarSSL with Clang 3.4's `scan-build` tool on Slackware and found some warnings. This branch contains fixes for some of the obvious ones. Interested in your thoughts.