This is what I have been using. I have tested it and it seems to work fine.
Thanks,
Russell
diff --git a/benchmarks/hectic.c b/benchmarks/hectic.c
index 6b6b3b5..886f7d2 100644
--- a/benchmarks/hectic.c
+++ b/benchmarks/hectic.c
@@ -336,7 +336,7 @@ static void *sleeper_switcher(void *cookie)
break;
case 1:
handle_bad_fpreg(param->cpu, ~0, -1);
- fallthrough;
+ __fallthrough;
case -1:
clean_exit(EXIT_FAILURE);
}
@@ -469,7 +469,7 @@ static void *rtup(void *cookie)
break;
case 1:
handle_bad_fpreg(param->cpu, ~0, -1);
- fallthrough;
+ __fallthrough;
case -1:
clean_exit(EXIT_FAILURE);
}
@@ -549,7 +549,7 @@ static void *rtus(void *cookie)
break;
case 1:
handle_bad_fpreg(param->cpu, ~0, -1);
- fallthrough;
+ __fallthrough;
case -1:
clean_exit(EXIT_FAILURE);
}
@@ -646,7 +646,7 @@ static void *rtuo(void *cookie)
break;
case 1:
handle_bad_fpreg(param->cpu, ~0, -1);
- fallthrough;
+ __fallthrough;
case -1:
clean_exit(EXIT_FAILURE);
}
@@ -811,7 +811,7 @@ static int task_create(struct cpu_tasks *cpu,
case RTUS:
case RTUO:
param->swt.flags = HECTIC_OOB_WAIT;
- fallthrough;
+ __fallthrough;
case SLEEPER:
case SWITCHER:
err = ioctl(cpu->fd, EVL_HECIOC_REGISTER_UTASK, ¶m->swt);
diff --git a/benchmarks/latmus.c b/benchmarks/latmus.c
index a507e80..59ed448 100644
--- a/benchmarks/latmus.c
+++ b/benchmarks/latmus.c
@@ -1252,10 +1252,10 @@ int main(int argc, char *const argv[])
switch (*endptr) {
case 'd':
timeout *= 24;
- fallthrough;
+ __fallthrough;
case 'h':
timeout *= 60;
- fallthrough;
+ __fallthrough;
case 'm':
timeout *= 60;
break;
diff --git a/include/evl/compiler.h b/include/evl/compiler.h
index fce2766..8e6ad8c 100644
--- a/include/evl/compiler.h
+++ b/include/evl/compiler.h
@@ -61,7 +61,7 @@
#endif
#ifndef __fallthrough
-#define fallthrough __attribute__((__fallthrough__))
+#define __fallthrough __attribute__((__fallthrough__))
#endif
#ifndef __alloc_size
diff --git a/lib/thread.c b/lib/thread.c
index 4b836cc..dc2ca6c 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -111,7 +111,7 @@ int evl_attach_thread(int flags, const char *fmt, ...)
break;
default:
policy = SCHED_FIFO;
- fallthrough;
+ __fallthrough;
case SCHED_FIFO:
case SCHED_RR:
priority = param.sched_priority;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6759 bytes
Desc: not available
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20220614/b4791815/attachment.bin>