summaryrefslogtreecommitdiffstats
path: root/cpukit/include
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2022-08-16 12:01:55 -0500
committerJoel Sherrill <joel@rtems.org>2022-08-19 15:34:47 -0500
commit9e2289785b7a12684d96c72e219523e2810f0f10 (patch)
tree8d361fbcd75758f4342d1f07ac69416b5476ec97 /cpukit/include
parentschedulerpriority.h: Fix gcc 12 warning (diff)
downloadrtems-9e2289785b7a12684d96c72e219523e2810f0f10.tar.bz2
test.h: Add pragma for gcc 12 warning
Updates #4662
Diffstat (limited to 'cpukit/include')
-rw-r--r--cpukit/include/rtems/test.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h
index c283be7860..e0823394d1 100644
--- a/cpukit/include/rtems/test.h
+++ b/cpukit/include/rtems/test.h
@@ -218,12 +218,19 @@ void T_check_null(const T_check_context_msg *, const void *);
void T_check_not_null(const T_check_context_msg *, const void *);
+/*
+ * This was added to address the following warning.
+ * warning: 'a' may be used uninitialized
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#define T_flags_not_null(a, flags, sa) \
{ \
static const T_check_context_msg T_check_instance = { \
{ T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, sa }; \
T_check_not_null(&T_check_instance, a); \
}
+#pragma GCC diagnostic pop
void T_check_eq_mem(const T_check_context_msg *, const void *, const void *,
size_t);