ref: fix gcc -Wall warnings