UPSTREAM: linux_mtd: fix build with clang >= 19
Starting with version 19, clang issues a warning when using `strlen()`
for initializing a static array's size. This causes the build to fail as
the project also sets `-Werror`.
This is fixed by using `sizeof()` instead, which is guaranteed to be
evaluated at compilation time and therefore not triggering the
problematic warning.
(cherry picked from commit 34b1a6aa57e910c0b5a518e8a0cab6841c7efaee)
Original-Change-Id: If470a65702e9ae08e4303123a0014e53a1fee56e
Original-Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/84856
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
GitOrigin-RevId: 34b1a6aa57e910c0b5a518e8a0cab6841c7efaee
Cr-Build-Id: 8732206241544516769
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8732206241544516769
Copybot-Job-Name: flashrom-main-copybot-downstream
Change-Id: Ia03ba8a3f7d2c78f37c7a92e14dd883c2c961ff1
Signed-off-by: chromeos-ci-prod <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/5985695
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Commit-Queue: Hsuan Ting Chen <roccochen@chromium.org>
1 file changed