* [patch] libselinux: fix EMBEDDED=y build
@ 2008-08-25 13:43 Stephen Smalley
2008-08-25 13:51 ` Joshua Brindle
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Smalley @ 2008-08-25 13:43 UTC (permalink / raw)
To: selinux; +Cc: Yuichi Nakamura, Joshua Brindle
Fix EMBEDDED=y build for libselinux.
Before:
$ make EMBEDDED=y > out
cc1: warnings being treated as errors
load_policy.c: In function ‘selinux_mkload_policy’:
load_policy.c:59: warning: unused variable ‘i’
load_policy.c:59: warning: unused variable ‘len’
load_policy.c:59: warning: unused variable ‘values’
load_policy.c:54: warning: unused variable ‘names’
make[1]: *** [load_policy.o] Error 1
After:
$ make EMBEDDED=y > out
$ make clean all > out
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
---
libselinux/src/load_policy.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libselinux/src/load_policy.c b/libselinux/src/load_policy.c
index 63f6609..affe37b 100644
--- a/libselinux/src/load_policy.c
+++ b/libselinux/src/load_policy.c
@@ -51,12 +51,12 @@ int selinux_mkload_policy(int preservebools)
int kernvers = security_policyvers();
int maxvers = kernvers, minvers = DEFAULT_POLICY_VERSION, vers;
int setlocaldefs = load_setlocaldefs;
- char path[PATH_MAX], **names;
+ char path[PATH_MAX];
struct stat sb;
struct utsname uts;
size_t size;
void *map, *data;
- int fd, rc = -1, *values, len, i, prot;
+ int fd, rc = -1, prot;
sepol_policydb_t *policydb;
sepol_policy_file_t *pf;
int usesepol = 0;
@@ -251,6 +251,8 @@ checkbool:
#ifndef DISABLE_BOOL
if (preservebools) {
+ int *values, len, i;
+ char **names;
rc = security_get_boolean_names(&names, &len);
if (!rc) {
values = malloc(sizeof(int) * len);
--
Stephen Smalley
National Security Agency
--
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.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] libselinux: fix EMBEDDED=y build
2008-08-25 13:43 [patch] libselinux: fix EMBEDDED=y build Stephen Smalley
@ 2008-08-25 13:51 ` Joshua Brindle
0 siblings, 0 replies; 2+ messages in thread
From: Joshua Brindle @ 2008-08-25 13:51 UTC (permalink / raw)
To: Stephen Smalley; +Cc: selinux, Yuichi Nakamura
Stephen Smalley wrote:
> Fix EMBEDDED=y build for libselinux.
>
> Before:
> $ make EMBEDDED=y > out
> cc1: warnings being treated as errors
> load_policy.c: In function ‘selinux_mkload_policy’:
> load_policy.c:59: warning: unused variable ‘i’
> load_policy.c:59: warning: unused variable ‘len’
> load_policy.c:59: warning: unused variable ‘values’
> load_policy.c:54: warning: unused variable ‘names’
> make[1]: *** [load_policy.o] Error 1
>
> After:
> $ make EMBEDDED=y > out
> $ make clean all > out
>
> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
trivial, acked-by: Joshua Brindle <method@manicmethod.com>
>
> ---
>
> libselinux/src/load_policy.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libselinux/src/load_policy.c b/libselinux/src/load_policy.c
> index 63f6609..affe37b 100644
> --- a/libselinux/src/load_policy.c
> +++ b/libselinux/src/load_policy.c
> @@ -51,12 +51,12 @@ int selinux_mkload_policy(int preservebools)
> int kernvers = security_policyvers();
> int maxvers = kernvers, minvers = DEFAULT_POLICY_VERSION, vers;
> int setlocaldefs = load_setlocaldefs;
> - char path[PATH_MAX], **names;
> + char path[PATH_MAX];
> struct stat sb;
> struct utsname uts;
> size_t size;
> void *map, *data;
> - int fd, rc = -1, *values, len, i, prot;
> + int fd, rc = -1, prot;
> sepol_policydb_t *policydb;
> sepol_policy_file_t *pf;
> int usesepol = 0;
> @@ -251,6 +251,8 @@ checkbool:
>
> #ifndef DISABLE_BOOL
> if (preservebools) {
> + int *values, len, i;
> + char **names;
> rc = security_get_boolean_names(&names, &len);
> if (!rc) {
> values = malloc(sizeof(int) * len);
>
--
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-25 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 13:43 [patch] libselinux: fix EMBEDDED=y build Stephen Smalley
2008-08-25 13:51 ` Joshua Brindle
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.