[rtems commit] schedulerpriority.h: Fix gcc 12 warning

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Aug 29 07:07:41 UTC 2022


On 19/08/2022 22:46, Joel Sherrill wrote:
> Module:    rtems
> Branch:    master
> Commit:    5b875915152a248079855bcb98e871f70ac314cc
> Changeset: http://git.rtems.org/rtems/commit/?id=5b875915152a248079855bcb98e871f70ac314cc
> 
> Author:    Ryan Long <ryan.long at oarcorp.com>
> Date:      Tue Aug 16 12:00:26 2022 -0500
> 
> schedulerpriority.h: Fix gcc 12 warning
> 
> Changed the size of the array to 1 to get rid of the warning.
> 
> Updates #4662
> 
> ---
> 
>   cpukit/include/rtems/score/schedulerpriority.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cpukit/include/rtems/score/schedulerpriority.h b/cpukit/include/rtems/score/schedulerpriority.h
> index cf5d0762a9..e485e97c60 100644
> --- a/cpukit/include/rtems/score/schedulerpriority.h
> +++ b/cpukit/include/rtems/score/schedulerpriority.h
> @@ -94,7 +94,7 @@ typedef struct {
>     /**
>      * @brief One ready queue per priority level.
>      */
> -  Chain_Control Ready[ 0 ];
> +  Chain_Control Ready[ 1 ];
>   } Scheduler_priority_Context;

Increasing the storage size to fix a warning is the wrong approach.  The 
warning should be suppressed in the application configuration header or 
the configuration should be changed to account for the new chain control.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list