[PATCH v1 04/12] percpu.h: Add pragma to disable -Wpedantic
Ryan Long
ryan.long at oarcorp.com
Tue Aug 16 20:11:52 UTC 2022
Updates #4662
---
cpukit/include/rtems/score/percpu.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cpukit/include/rtems/score/percpu.h b/cpukit/include/rtems/score/percpu.h
index 24086cde86..fdd40e0a8b 100644
--- a/cpukit/include/rtems/score/percpu.h
+++ b/cpukit/include/rtems/score/percpu.h
@@ -262,6 +262,13 @@ typedef struct Per_CPU_Job {
/**
* @brief Per-CPU statistics.
*/
+
+/*
+ * This was added to address the following warning:
+ * warning: struct has no members
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
typedef struct {
#if defined( RTEMS_PROFILING )
/**
@@ -330,6 +337,7 @@ typedef struct {
uint64_t total_interrupt_time;
#endif /* defined( RTEMS_PROFILING ) */
} Per_CPU_Stats;
+#pragma GCC diagnostic pop
/**
* @brief Per-CPU watchdog header index.
--
2.11.0
More information about the devel
mailing list