avoid -Wredundant-decls and -Wshadow
added vmbuf_chrcpy
add format attribute protection

using %l to instead of %z for 32bit compatibility