Combined code changes (showp1984/ franciscofranco/ trailblazerz) to fix warnings/ errors and allow GCC4.7 compiling

Signed-off-by: Daniel Tarrant <daniel.g.tarrant@gmail.com>