]> www.infradead.org Git - mtd-utils.git/commit
nand-utils: nanddump: Fix unexpected type compiling warning for argument 'dumpfile'
authorZhihao Cheng <chengzhihao1@huawei.com>
Sun, 26 Jan 2025 06:41:58 +0000 (14:41 +0800)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Thu, 30 Jan 2025 17:30:16 +0000 (18:30 +0100)
commit9d755ba03f6947ed0f77df8a2bcdb1b6585dabf9
tree5e7e81936e62017d247792c76702d5a32f1af84a
parent53a16db8824ee93ab066e57744cb6f7ea5ba053d
nand-utils: nanddump: Fix unexpected type compiling warning for argument 'dumpfile'

The const pointer argument cannot be passed into libc function 'free()',
otherwise the compiler will complain following message:
 nand-utils/nanddump.c:168:10: warning: passing argument 1 of ‘free’
 discards ‘const’ qualifier from pointer target type

Fixes: c89009463888 ("nanddump: don't leak copied command line arguments")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
nand-utils/nanddump.c