[z2009] Fix some warnings

Thx to stfx for porting

Signed-off-by: stfx <stfx@hotmail.de>
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>

(cleaned version of 2522e0e)

(based on commit [s1613] - eaccae1)