diff options
author | Ryan Long <ryan.long@oarcorp.com> | 2022-08-16 12:06:05 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2022-08-19 15:34:47 -0500 |
commit | f045b9ddd82108215a985bfcc6f2c0f604a6b24c (patch) | |
tree | d8b11a6155a09d86a34ef806887559e9af6c49f1 /testsuites/psxtests/psxkey07/init.c | |
parent | psxclock/init.c: Change print format for warning (diff) | |
download | rtems-f045b9ddd82108215a985bfcc6f2c0f604a6b24c.tar.bz2 |
psxkey07/init.c: Add pragma for gcc 12 warning
Updates #4662
Diffstat (limited to 'testsuites/psxtests/psxkey07/init.c')
-rw-r--r-- | testsuites/psxtests/psxkey07/init.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/testsuites/psxtests/psxkey07/init.c b/testsuites/psxtests/psxkey07/init.c index 593df739db..15387264ba 100644 --- a/testsuites/psxtests/psxkey07/init.c +++ b/testsuites/psxtests/psxkey07/init.c @@ -56,8 +56,15 @@ rtems_task Test_Thread(rtems_task_argument argument) value_p = malloc( sizeof( int ) ); rtems_test_assert(value_p != NULL); - sc = pthread_setspecific( Key, value_p ); - rtems_test_assert( !sc ); +/* + * This was added to address the following warning. + * warning: 'value_p' may be used uninitialized + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" + sc = pthread_setspecific( Key, value_p ); +#pragma GCC diagnostic pop + rtems_test_assert( !sc ); pthread_mutex_lock( &mutex1 ); ++setted_thread_count; |