merge-file: support -p and -q; fix compile warnings