25 lines
685 B
Diff
25 lines
685 B
Diff
super-intel.c:284: warning: operation on 'p' may be undefined
|
|
super-intel.c:284: warning: operation on 'p' may be undefined
|
|
super-intel.c:284: warning: operation on 'p' may be undefined
|
|
|
|
The swap macros can evaluate their argument multiple times.
|
|
---
|
|
super-intel.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
--- super-intel.c.orig
|
|
+++ super-intel.c
|
|
@@ -280,8 +280,10 @@ static __u32 __gen_imsm_checksum(struct
|
|
__u32 *p = (__u32 *) mpb;
|
|
__u32 sum = 0;
|
|
|
|
- while (end--)
|
|
- sum += __le32_to_cpu(*p++);
|
|
+ while (end--) {
|
|
+ sum += __le32_to_cpu(*p);
|
|
+ p++;
|
|
+ }
|
|
|
|
return sum - __le32_to_cpu(mpb->check_sum);
|
|
}
|