]> git.ipfire.org Git - thirdparty/systemd.git/commit
musl: avoid multiple evaluations in CPU_ISSET_S() macro
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Jul 2025 03:53:14 +0000 (12:53 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 12 Nov 2025 23:02:05 +0000 (08:02 +0900)
commitebbc0ea7fd764c870bb8689111138b4f73854d42
tree9df0d1f26039351312dc9c576819f85176c77a24
parent5bb9063505fe64788e696dc133899231506866c6
musl: avoid multiple evaluations in CPU_ISSET_S() macro

musl's CPU_ISSET_S() macro does not avoid multiple evaluations, and it
only accepts simple variable or constant.

Fixes the following error.
```
../src/shared/cpu-set-util.c: In function ‘cpu_set_to_mask_string’:
../src/shared/cpu-set-util.c:101:41: warning: operation on ‘i’ may be undefined [-Werror=sequence-point]
  101 |                         if (CPU_ISSET_S(--i, c->allocated, c->set))
      |                                         ^
```
src/shared/cpu-set-util.c