summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBen Dooks <[email protected]>2025-07-04 13:29:38 +0100
committerAnup Patel <[email protected]>2025-07-20 21:15:10 +0530
commit663b05a5f745f6b1360f073587bb57fe9af6a40a (patch)
tree752b5828f654624ce72ef272adb36d42f76af137 /scripts
parentedfbc1285dd9ac624665fe9fa5de26437d61c1eb (diff)
include: sbi: fix swap errors with newer gcc -Werror=sequence-point
The BSWAPxx() macros are now throwing the following warnings with newer gcc versions. This is due to throwing an argument in that may be evaluated more than one (I think) and therefore things like the example below should be avoided. Fix by making a set of BSWAPxx() wrappers which specifically only evaluate 'x' once. In file included lib/sbi/sbi_mpxy.c:21: lib/sbi/sbi_mpxy.c: In function ‘sbi_mpxy_write_attrs’: ib/sbi/sbi_mpxy.c:632:63: error: operation on ‘mem_idx’ may be undefined [-Werror=sequence-point] 632 | attr_val = le32_to_cpu(mem_ptr[mem_idx++]); | ~~~~~~~^~ Signed-off-by: Ben Dooks <[email protected]> Reviewed-by: Rahul Pathak <[email protected]> Reviewed-by: Xiang W <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions