Fix problems found by cppcheck 1.56
Doesn't fix all problems. New suppressions in Jenkins for 4.6
(so that I can upgrade without having to fix all):
--suppress=uninitvar:src/gmxlib/md5.c --suppress=nullPointer:src/mdlib/mdebin_bar.c --suppress=nullPointer:src/gmxlib/oenv.c --suppress=nullPointer:src/gmxlib/selection/selhelp.c \
--suppress=memleak:src/tools/levenmar.c --suppress=selfAssignment:src/gmxlib/nonbonded/nb_kernel_bluegene/* \
--suppress=invalidPointerCast:src/gmxlib/checkpoint.c --suppress=invalidPointerCast:src/gmxlib/nonbonded/nb_kernel_sse2_single/* --suppress=invalidPointerCast:src/mdlib/fftpack.c \
--suppress=obsoleteFunctionsusleep:*.c --suppress=obsoleteFunctionsctime_r:*.c --suppress=invalidPrintfArgType_sint:*.c invalidPrintfArgType_uint:*.c
The remaining nullPointer are false positives as far as I know.
Problems found in 4.6 (haven't run cppcheck on 4.5) but
applied to 4.5 because it is also affected.
Change-Id: I5c0b4bce52a0c9ff6ef4ba51721cdf5baff42814