add cast to avoid warning
add cast to fix compilation for i386 architecture