Hi, I'm getting build error after this commit. ``` /home/vijay/development/rtems/6/lib/gcc/i386-rtems6/10.2.1/../../../../i386-rtems6/bin/ld: ./librtemscpu.a(getgrent.c.57.o): in function `endgrent': /home/vijay/rtems-class/rtems/build/i386/pc386/../../../cpukit/libcsupport/src/getgrent.c:109: undefined reference to `_Assert_Unused_variable_equals' collect2: error: ld returned 1 exit status ``` Looks like assert.h isn't included from getgrent.c . I have attached a patch to add the header files and checked that it's building now.
Best regards, Vijay On Fri, Feb 26, 2021 at 3:56 PM Joel Sherrill <j...@rtems.org> wrote: > > Module: rtems > Branch: master > Commit: e5e58da6dfbdfa78ad499c2f52ec53c88538aa1c > Changeset: > http://git.rtems.org/rtems/commit/?id=e5e58da6dfbdfa78ad499c2f52ec53c88538aa1c > > Author: Ryan Long <ryan.l...@oarcorp.com> > Date: Fri Feb 19 17:30:13 2021 -0500 > > getgrent.c: Fix Unchecked return value error (CID #1459004) > > CID 1459004: Unchecked return value in endgrent(). > > Closes #4261 > > --- > > cpukit/libcsupport/src/getgrent.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/cpukit/libcsupport/src/getgrent.c > b/cpukit/libcsupport/src/getgrent.c > index b358cb9..de56430 100644 > --- a/cpukit/libcsupport/src/getgrent.c > +++ b/cpukit/libcsupport/src/getgrent.c > @@ -95,6 +95,7 @@ void setgrent(void) > void endgrent(void) > { > grp_context *ctx = grp_get_context(); > + int sc; > > if (ctx == NULL) > return; > @@ -104,5 +105,6 @@ void endgrent(void) > } > > free(ctx); > - pthread_setspecific(grp_key, NULL); > + sc = pthread_setspecific(grp_key, NULL); > + _Assert_Unused_variable_equals(sc, 0); > } > > _______________________________________________ > vc mailing list > v...@rtems.org > http://lists.rtems.org/mailman/listinfo/vc
From a9129b9ed03df174a60b44b18096a069a5cd6a7b Mon Sep 17 00:00:00 2001 From: Vijay Kumar Banerjee <vi...@rtems.org> Date: Fri, 26 Feb 2021 23:09:01 -0700 Subject: [PATCH] getgrent.c, record-client.c: Add missing includes for assert.h --- cpukit/libcsupport/src/getgrent.c | 1 + cpukit/libtrace/record/record-client.c | 1 + 2 files changed, 2 insertions(+) diff --git a/cpukit/libcsupport/src/getgrent.c b/cpukit/libcsupport/src/getgrent.c index de564304d4..d4d3705115 100644 --- a/cpukit/libcsupport/src/getgrent.c +++ b/cpukit/libcsupport/src/getgrent.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <pthread.h> +#include <rtems/score/assert.h> typedef struct { FILE *fp; diff --git a/cpukit/libtrace/record/record-client.c b/cpukit/libtrace/record/record-client.c index 975e3a76d3..f81fb0a2c4 100644 --- a/cpukit/libtrace/record/record-client.c +++ b/cpukit/libtrace/record/record-client.c @@ -38,6 +38,7 @@ #include <stdlib.h> #include <string.h> +#include <rtems/score/assert.h> #define TIME_MASK ( ( UINT32_C( 1 ) << RTEMS_RECORD_TIME_BITS ) - 1 ) -- 2.26.2
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel