The warning was introduced yesterday on this change:

http://lists.gnu.org/archive/html/coreutils/2014-07/msg00002.html

src/chcon.c:144:21: error: initialization makes integer from pointer
without a cast

Feel free to modify the patch as you wish.

Thanks,
deymo.
From 5cb25a56180f01c84294bda4154902b5e6ad9cc8 Mon Sep 17 00:00:00 2001
From: Alex Deymo <[email protected]>
Date: Tue, 1 Jul 2014 22:52:32 -0700
Subject: [PATCH] maint: Fix warning when initializing context_t

The context_t is defined by lib/selinux/context.h as an int type, but
defined as a pointer type by SELinux. This patch casts the value 0 to
the proper type to avoid the warning.

* src/chcon.c: Cast 0 to context_t before assign.
---
 src/chcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/chcon.c b/src/chcon.c
index e253a46..5a45edf 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -141,7 +141,7 @@ static int
 change_file_context (int fd, char const *file)
 {
   char *file_context = NULL;
-  context_t context IF_LINT (= NULL);
+  context_t context IF_LINT (= (context_t) 0);
   char const * context_string;
   int errors = 0;
 
-- 
2.0.0.526.g5318336

Reply via email to