Skip to content

Commit f7580e4

Browse files
committed
Apply RESTRICT_STATIC MSVC workaround to arm/cache.c as well
In #283 a workaround was introduced to remove the `restrict static` attributes on MSVC where it is not supported. This was only defined and used in `arm/api.h` however and not in `arm/cache.c`, leading to this file to fail compilation because it is included in `ARM_SRCS` for the `windows_arm64` target in `BUILD.bazel`. Fix that by replacing `restrict static` with `RESTRICT_STATIC` which will be defined by the `arm/api.h` header that is already included in `arm/cache.c`.
1 parent 39ea79a commit f7580e4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/arm/cache.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ void cpuinfo_arm_decode_cache(
1010
enum cpuinfo_uarch uarch,
1111
uint32_t cluster_cores,
1212
uint32_t midr,
13-
const struct cpuinfo_arm_chipset chipset[restrict static 1],
13+
const struct cpuinfo_arm_chipset chipset[RESTRICT_STATIC 1],
1414
uint32_t cluster_id,
1515
uint32_t arch_version,
16-
struct cpuinfo_cache l1i[restrict static 1],
17-
struct cpuinfo_cache l1d[restrict static 1],
18-
struct cpuinfo_cache l2[restrict static 1],
19-
struct cpuinfo_cache l3[restrict static 1]) {
16+
struct cpuinfo_cache l1i[RESTRICT_STATIC 1],
17+
struct cpuinfo_cache l1d[RESTRICT_STATIC 1],
18+
struct cpuinfo_cache l2[RESTRICT_STATIC 1],
19+
struct cpuinfo_cache l3[RESTRICT_STATIC 1]) {
2020
switch (uarch) {
2121
#if CPUINFO_ARCH_ARM && !defined(__ARM_ARCH_7A__) && !defined(__ARM_ARCH_8A__)
2222
case cpuinfo_uarch_xscale:

0 commit comments

Comments
 (0)