All of lore.kernel.org
 help / color / mirror / Atom feed
From: tmiller@tresys.com
To: selinux@tycho.nsa.gov
Cc: method@madmethod.com, sds@tycho.nsa.gov
Subject: [patch 1/7] quiet checkpolicy warnings
Date: Thu, 03 Jan 2008 13:43:32 -0500	[thread overview]
Message-ID: <20080103184515.268146258@tresys.com> (raw)
In-Reply-To: 20080103184331.485176161@tresys.com

Fix shadowed variable in dispol/dismod
Use bison instead of yacc to avoid an unused label warning.

---
 checkpolicy/Makefile      |    2 ++
 checkpolicy/test/dismod.c |    8 ++++----
 checkpolicy/test/dispol.c |    8 ++++----
 3 files changed, 10 insertions(+), 8 deletions(-)

Index: trunk/checkpolicy/Makefile
===================================================================
--- trunk.orig/checkpolicy/Makefile
+++ trunk/checkpolicy/Makefile
@@ -8,6 +8,8 @@ LIBDIR ?= $(PREFIX)/lib
 INCLUDEDIR ?= $(PREFIX)/include
 TARGETS = checkpolicy checkmodule
 
+YACC = bison -y
+
 CFLAGS ?= -g -Wall -O2 -pipe -fno-strict-aliasing
 
 override CFLAGS += -I. -I${INCLUDEDIR}
Index: trunk/checkpolicy/test/dismod.c
===================================================================
--- trunk.orig/checkpolicy/test/dismod.c
+++ trunk/checkpolicy/test/dismod.c
@@ -666,13 +666,13 @@ int display_avblock(int field, uint32_t 
 	return 0;
 }
 
-int display_handle_unknown(policydb_t * policydb, FILE * out_fp)
+int display_handle_unknown(policydb_t * p, FILE * out_fp)
 {
-	if (policydb->handle_unknown == ALLOW_UNKNOWN)
+	if (p->handle_unknown == ALLOW_UNKNOWN)
 		fprintf(out_fp, "Allow unknown classes and perms\n");
-	else if (policydb->handle_unknown == DENY_UNKNOWN)
+	else if (p->handle_unknown == DENY_UNKNOWN)
 		fprintf(out_fp, "Deny unknown classes and perms\n");
-	else if (policydb->handle_unknown == REJECT_UNKNOWN)
+	else if (p->handle_unknown == REJECT_UNKNOWN)
 		fprintf(out_fp, "Reject unknown classes and perms\n");
 	return 0;
 }
Index: trunk/checkpolicy/test/dispol.c
===================================================================
--- trunk.orig/checkpolicy/test/dispol.c
+++ trunk/checkpolicy/test/dispol.c
@@ -274,13 +274,13 @@ int display_cond_expressions(policydb_t 
 	return 1;
 }
 
-int display_handle_unknown(policydb_t * policydb, FILE * out_fp)
+int display_handle_unknown(policydb_t * p, FILE * out_fp)
 {
-	if (policydb->handle_unknown == ALLOW_UNKNOWN)
+	if (p->handle_unknown == ALLOW_UNKNOWN)
 		fprintf(out_fp, "Allow unknown classes and permisions\n");
-	else if (policydb->handle_unknown == DENY_UNKNOWN)
+	else if (p->handle_unknown == DENY_UNKNOWN)
 		fprintf(out_fp, "Deny unknown classes and permisions\n");
-	else if (policydb->handle_unknown == REJECT_UNKNOWN)
+	else if (p->handle_unknown == REJECT_UNKNOWN)
 		fprintf(out_fp, "Reject unknown classes and permisions\n");
 	return 0;
 }

-- 

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2008-01-03 18:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 18:43 [patch 0/7] quiet gcc warnings tmiller
2008-01-03 18:43 ` tmiller [this message]
2008-01-03 18:43 ` [patch 2/7] quiet libsepol qualifier warnings tmiller
2008-01-03 18:43 ` [patch 3/7] quiet getdefaultcon warning tmiller
2008-01-03 18:43 ` [patch 4/7] quiet libsemanage scanner warnings tmiller
2008-01-03 18:43 ` [patch 5/7] quiet libsepol uninitialized variable warnings tmiller
2008-01-03 18:43 ` [patch 6/7] quiet policycoreutils warnings tmiller
2008-01-03 18:43 ` [patch 7/7] Use -Werror tmiller
2008-01-07 18:06   ` Stephen Smalley
2008-01-07 18:30     ` Joshua Brindle
2008-01-07 18:50       ` Stephen Smalley
2008-01-09 18:47 ` [patch 0/7] quiet gcc warnings Todd Miller

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=20080103184515.268146258@tresys.com \
    --to=tmiller@tresys.com \
    --cc=method@madmethod.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.