[PATCH] Fix compiler warnings for schedulerstrongapa.c
Richi Dubey
richidubey at gmail.com
Mon Jul 5 16:12:25 UTC 2021
Done. Can you please check now? I have verified that it works.
On Mon, Jul 5, 2021 at 11:09 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> On 03/07/2021 09:06, Richi Dubey wrote:
> > ---
> > cpukit/score/src/schedulerstrongapa.c | 21 ++++++++++++++++-----
> > 1 file changed, 16 insertions(+), 5 deletions(-)
> >
> > diff --git a/cpukit/score/src/schedulerstrongapa.c
> b/cpukit/score/src/schedulerstrongapa.c
> > index 845d19d1a8..b34ffe4b6d 100644
> > --- a/cpukit/score/src/schedulerstrongapa.c
> > +++ b/cpukit/score/src/schedulerstrongapa.c
> > @@ -187,7 +187,7 @@ static inline Scheduler_Node *
> _Scheduler_strong_APA_Find_highest_ready(
> > uint32_t rear
> > )
> > {
> > - Scheduler_Node *highest_ready;
> > + Scheduler_Node *highest_ready = NULL;
> > Scheduler_strong_APA_CPU *CPU;
> > const Chain_Node *tail;
> > Chain_Node *next;
> > @@ -259,6 +259,10 @@ static inline Scheduler_Node *
> _Scheduler_strong_APA_Find_highest_ready(
> > }
> > }
> >
> > + /*
> > + * By definition, the system would always have a ready node,
> > + * hence highest_ready would not be NULL.
> > + */
> > return highest_ready;
>
> Could you please add an _Assert( highest_ready != NULL ) statement here
> and also to the following parts.
>
> --
> 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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210705/f6bbe815/attachment.html>
More information about the devel
mailing list