percpu.h: Add pragma for gcc 12 warning

Updates #4662
This commit is contained in:
Ryan Long
2022-08-16 11:59:48 -05:00
committed by Joel Sherrill
parent df3fa4e005
commit c55bd16037

View File

@@ -262,6 +262,13 @@ typedef struct Per_CPU_Job {
/** /**
* @brief Per-CPU statistics. * @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 { typedef struct {
#if defined( RTEMS_PROFILING ) #if defined( RTEMS_PROFILING )
/** /**
@@ -330,6 +337,7 @@ typedef struct {
uint64_t total_interrupt_time; uint64_t total_interrupt_time;
#endif /* defined( RTEMS_PROFILING ) */ #endif /* defined( RTEMS_PROFILING ) */
} Per_CPU_Stats; } Per_CPU_Stats;
#pragma GCC diagnostic pop
/** /**
* @brief Per-CPU watchdog header index. * @brief Per-CPU watchdog header index.