Skip to contentSkip to conversation

libselinux-2

PATCH In review Bastian Blank 2 participants 2 messages Oct 23, 2003 – Oct 24, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libselinux-2

hi folks

this patch fixes following problems:
- mark some attributes as unused
- signed vs. unsigned
- add -W -Werror to CFLAGS
files: utils/*

bastian

Signature · 2 lines
There are always alternatives.
		-- Spock, "The Galileo Seven", stardate 2822.3
policyvers.c +1 -1
Index: utils/policyvers.c
===================================================================
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include <selinux/selinux.h>
 
-int main(int argc, char **argv) 
+int main(int argc __attribute__((unused)), char **argv) 
 {
 	int rc;
 
compute_av.c +2 -2
Index: utils/compute_av.c
===================================================================
@@ -32,7 +32,7 @@
 	print_access_vector(tclass, avd.allowed);
 	printf("\n");
 
-	if (avd.decided != ~0) {
+	if (avd.decided != ~0U) {
 		printf("decided=");
 		print_access_vector(tclass, avd.decided);
 		printf("\n");
@@ -44,7 +44,7 @@
 		printf("\n");
 	}
 
-	if (avd.auditdeny != ~0) {
+	if (avd.auditdeny != ~0U) {
 		printf("auditdeny");
 		print_access_vector(tclass, avd.auditdeny);
 		printf("\n");
selinuxenabled.c +1 -1
Index: utils/selinuxenabled.c
===================================================================
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include <selinux/selinux.h>
 
-int main(int argc, char **argv) 
+int main(void) 
 {
 	return !is_selinux_enabled();
 }
mkdircon.c +1 -1
Index: utils/mkdircon.c
===================================================================
@@ -8,7 +8,7 @@
 int main(int argc, char **argv) 
 {
 	int rc;
-	unsigned i;
+	int i;
 
 	if (argc < 3) {
 		fprintf(stderr, "usage:  %s context dirname...\n",
getcon.c +1 -1
Index: utils/getcon.c
===================================================================
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include <selinux/selinux.h>
 
-int main(int argc, char **argv) 
+int main(int argc __attribute__ ((unused)), char **argv) 
 {
 	char *buf;
 	int rc;
getenforce.c +1 -1
Index: utils/getenforce.c
===================================================================
@@ -3,7 +3,7 @@
 #include <stdlib.h>
 #include <selinux/selinux.h>
 
-int main(int argc, char **argv) 
+int main(int argc __attribute__((unused)), char **argv) 
 {
 	int rc;
 
Makefile +2 -2
Index: utils/Makefile
===================================================================
@@ -2,9 +2,9 @@
 PREFIX ?= $(DESTDIR)/usr
 BINDIR ?= $(PREFIX)/bin
 
-CFLAGS = -Wall
+CFLAGS = -Wall -W -Werror
 override CFLAGS += -I../include
-LDLIBS += -L../src -lselinux 
+LDLIBS += -L../src -lselinux
 
 TARGETS=$(patsubst %.c,%,$(wildcard *.c))
 
#1 lore raw
Quoted 7 lines · Bastian Blank

hi folks

this patch fixes following problems:
- mark some attributes as unused
- signed vs. unsigned
- add -W -Werror to CFLAGS
files: utils/*

Merged, except for the CFLAGS change.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.