mm: shmem: Fix an incorrect type in shmem_parse_opt_casefold()
Subsystems (2)
PATCH 1/1 mm: shmem: Fix an incorrect type in shmem_parse_opt_casefold()
The return value from the call to utf8_parse_version() is int. However, the return value is being assigned to an unsiged int variable 'version', so making 'version' an int.
./mm/shmem.c:4368:6-13: WARNING: Unsigned expression compared with zero: version < 0.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/shmem.c +1 -1
@@ -4355,7 +4355,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter * bool latest_version) {struct shmem_options *ctx = fc->fs_private; -unsigned int version =UTF8_LATEST ; +int version =UTF8_LATEST ;struct unicode_map *encoding;char *version_str = param->string +5 ;
Signature · 1 line
2.32.0.3.g01195cf9f