lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090119211031.934b4c19.sfr@canb.auug.org.au>
Date:	Mon, 19 Jan 2009 21:10:31 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	David Howells <dhowells@...hat.com>
Cc:	James Morris <jmorris@...ei.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] creds: suppress warning in get_cred

This is the usual way to force a conversion from a const pointer to a
non-const one and gets rid of this warning:

include/linux/cred.h: In function 'get_cred':
include/linux/cred.h:188: warning: passing argument 1 of 'get_new_cred' discards qualifiers from pointer target type

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 include/linux/cred.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/cred.h b/include/linux/cred.h
index 3282ee4..ed38227 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -12,6 +12,7 @@
 #ifndef _LINUX_CRED_H
 #define _LINUX_CRED_H
 
+#include <linux/types.h>
 #include <linux/capability.h>
 #include <linux/key.h>
 #include <asm/atomic.h>
@@ -185,7 +186,7 @@ static inline struct cred *get_new_cred(struct cred *cred)
  */
 static inline const struct cred *get_cred(const struct cred *cred)
 {
-	return get_new_cred((struct cred *) cred);
+	return get_new_cred((struct cred *)(uintptr_t)cred);
 }
 
 /**
-- 
1.6.0.5

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ