History

power: supply: core: fix clang -Wunsequenced

The increment operator of pointer in be32_to_cpu() is not explicitly. It made the warning from clang: drivers/power/supply/power_supply_core.c:674:36: error: multiple unsequenced modifications to 'list' [-Werror,-Wunsequenced] drivers/power/supply/power_supply_core.c:675:41: error: multiple unsequenced modifications to 'list' [-Werror,-Wunsequenced] Link: https://github.com/ClangBuiltLinux/linux/issues/460

Phong Tran committed 7 years ago

Commit caee2841 parent 61e93651 file · +4 −2Browse files

Unified · Split

drivers/power/supply/power_supply_core.c+4−2
@@ -671,8 +671,10 @@ int power_supply_get_battery_info(struct power_supply *psy, · 670 unmodified lines
671 }671 }
672 672
673 for (i = 0; i < tab_len; i++) {673 for (i = 0; i < tab_len; i++) {
674 table[i].ocv = be32_to_cpu(*list++);674 table[i].ocv = be32_to_cpu(*list);
675 table[i].capacity = be32_to_cpu(*list++);675 list++;
676 table[i].capacity = be32_to_cpu(*list);
677 list++;
676 }678 }
677 }679 }
678 680

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t