Fixed clang static analyzer warnings

Signed-off-by: Vincent Fournié <vincent.fournie@epyx.ch>