summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorJustin Stitt <justinstitt@google.com>2023-08-16 18:26:44 +0000
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-08-18 16:38:54 +0200
commita417ab334dccb603f6296cbf04c9f8059bc252eb (patch)
tree5c98f29755f027cea5d29dff084f6631112d867e /.clang-format
parent264725e35fbc3b67e053a405e022393a6017e6da (diff)
mtd: maps: fix -Wvoid-pointer-to-enum-cast warning
When building with clang 18 I see the following warning: | drivers/mtd/maps/physmap-versatile.c:209:25: warning: cast to smaller | integer type 'enum versatile_flashprot' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 209 | versatile_flashprot = (enum versatile_flashprot)devid->data; This is due to the fact that `devid->data` is a void* while `enum versatile_flashprot` has the size of an int. Cast `devid->data` to a uintptr_t to silence the above warning for clang builds using W=1. Link: https://github.com/ClangBuiltLinux/linux/issues/1910 Reported-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230816-void-drivers-mtd-maps-physmap-versatile-v2-1-433a25272bfa@google.com
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions