From e729fbe9b4dae01b9895f361307ffdae9664b5c5 Mon Sep 17 00:00:00 2001 From: William Roberts Date: Fri, 23 Sep 2016 13:55:50 -0700 Subject: [PATCH] libsepol: fix unused variable 'size' on mac build Fix this on Mac build: genbools.c:71:9: warning: unused variable 'size' [-Wunused-variable] size_t size = 0; ^ Signed-off-by: William Roberts --- libsepol/src/genbools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsepol/src/genbools.c b/libsepol/src/genbools.c index c81e8485..c1f54055 100644 --- a/libsepol/src/genbools.c +++ b/libsepol/src/genbools.c @@ -68,7 +68,6 @@ static int load_booleans(struct policydb *policydb, const char *path, { FILE *boolf; char *buffer = NULL; - size_t size = 0; char localbools[BUFSIZ]; char name[BUFSIZ]; int val; @@ -87,6 +86,7 @@ static int load_booleans(struct policydb *policydb, const char *path, while(fgets(buffer, 255, boolf) != NULL) { #else + size_t size = 0; while (getline(&buffer, &size, boolf) > 0) { #endif int ret = process_boolean(buffer, name, sizeof(name), &val);