All of lore.kernel.org
 help / color / mirror / Atom feed
From: william.c.roberts@intel.com
To: selinux@tycho.nsa.gov, sds@tycho.nsa.gov, brindle@quarksecurity.com
Subject: [PATCH 1/3] libsepol: fix unused variable 'size' on mac build
Date: Fri, 23 Sep 2016 13:55:50 -0700	[thread overview]
Message-ID: <1474664152-18727-2-git-send-email-william.c.roberts@intel.com> (raw)
In-Reply-To: <1474664152-18727-1-git-send-email-william.c.roberts@intel.com>

From: William Roberts <william.c.roberts@intel.com>

Fix this on Mac build:
genbools.c:71:9: warning: unused variable 'size' [-Wunused-variable]
        size_t size = 0;
               ^
Signed-off-by: William Roberts <william.c.roberts@intel.com>
---
 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 c81e848..c1f5405 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);
-- 
1.9.1

  reply	other threads:[~2016-09-23 20:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23 20:55 Libsepol Mac Build Errors william.c.roberts
2016-09-23 20:55 ` william.c.roberts [this message]
2016-09-23 20:55 ` [PATCH 2/3] libsepol: fix unused variable 'len' on mac build william.c.roberts
2016-09-23 20:55 ` [PATCH 3/3] libsepol: fix unitialized variable 'nread' " william.c.roberts
2016-09-26 14:37   ` Stephen Smalley
2016-09-24  1:10 ` Libsepol Mac Build Errors Joshua Brindle
2016-09-24  1:39   ` William Roberts
2016-09-24  1:42     ` Joshua Brindle
2016-09-24  1:51       ` William Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474664152-18727-2-git-send-email-william.c.roberts@intel.com \
    --to=william.c.roberts@intel.com \
    --cc=brindle@quarksecurity.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.