[MTD] Fix build warnings (and debug build error) in nand_base.c