mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-28 00:42:07 +00:00
libsepol: fix unitialized variable 'nread' on mac build
Fix this: genusers.c:63:14: warning: variable 'nread' is uninitialized when used here [-Wuninitialized] if (buffer[nread - 1] == '\n') ^~~~~ genusers.c:40:15: note: initialize the variable 'nread' to silence this warning ssize_t nread; ^ = 0 Signed-off-by: William Roberts <william.c.roberts@intel.com>
This commit is contained in:
parent
87c5afdad2
commit
d97cd6a203
@ -53,6 +53,7 @@ static int load_users(struct policydb *policydb, const char *path)
|
||||
}
|
||||
|
||||
while(fgets(buffer, 255, fp) != NULL) {
|
||||
nread = strlen(buffer);
|
||||
#else
|
||||
size_t len = 0;
|
||||
__fsetlocking(fp, FSETLOCKING_BYCALLER);
|
||||
|
Loading…
Reference in New Issue
Block a user