summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-03-02 11:46:02 -0500
committerJoel Sherrill <joel@rtems.org>2021-03-08 14:04:10 -0600
commit55ba229d228d1b7372256978828c573dd0af56d4 (patch)
treefe345a2101bdc82391f7107bf06e4698519e2e65 /cpukit/libcsupport
parentmain_chmod.c: Fix Unchecked return value from library (CID #1063856) (diff)
downloadrtems-55ba229d228d1b7372256978828c573dd0af56d4.tar.bz2
pwdgrp.c: Fix Unchecked return value from library (CID #1255518)
CID 1255518: Unchecked return value from library in pwdgrp_init(). Closes #4282
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r--cpukit/libcsupport/src/pwdgrp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/pwdgrp.c b/cpukit/libcsupport/src/pwdgrp.c
index a97d397982..f4a10f7f46 100644
--- a/cpukit/libcsupport/src/pwdgrp.c
+++ b/cpukit/libcsupport/src/pwdgrp.c
@@ -36,6 +36,7 @@
#include <stdint.h>
#include <rtems/seterr.h>
+#include <rtems/score/assert.h>
#include "pwdgrp.h"
@@ -62,10 +63,13 @@ static void init_file(const char *name, const char *content)
*/
static void pwdgrp_init(void)
{
+ int sc;
+
/*
* Do the best to create this directory.
*/
- mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ sc = mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ _Assert_Unused_variable_equals(sc, 0);
/*
* Initialize /etc/passwd