]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: cpuset: do not use const on the source of CPU_AND/CPU_ASSIGN
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 08:10:52 +0000 (09:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 18:04:02 +0000 (19:04 +0100)
commita65b4933bae485c7dd7de53c665d09954f92a9f9
tree7b26d4429f50cc2ec4f3de59b46ee20fe1c54de3
parent8da23393a1ec3f24dcd408f4b35fdd3d9a141a5f
BUILD: cpuset: do not use const on the source of CPU_AND/CPU_ASSIGN

The man page indicates that CPU_AND() and CPU_ASSIGN() take a variable,
not a const on the source, even though it doesn't make much sense. But
with older libcs, this triggers a build warning:

  src/cpuset.c: In function 'ha_cpuset_and':
  src/cpuset.c:53: warning: initialization discards qualifiers from pointer target type
  src/cpuset.c: In function 'ha_cpuset_assign':
  src/cpuset.c:101: warning: initialization discards qualifiers from pointer target type

Better stick stricter to the documented API as this is really harmless
here. There's no need to backport it (unless build issues are reported,
which is quite unlikely).
include/haproxy/cpuset.h
src/cpuset.c