Scan: fix compiler warnings