From: Johannes Stezenbach <js@convergence.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.6.0-test9 ioctl compile warnings in userspace
Date: Wed, 12 Nov 2003 17:37:50 +0100 [thread overview]
Message-ID: <20031112163750.GB18989@convergence.de> (raw)
Hi,
the patch below fixes
warning: signed and unsigned type in conditional expression
when compiling userspace programs with a glibc built against
2.6 kernel headers.
This is a better version of my previous patch which aims
to fix all affected architectures.
Johannes
diff -rN -u4 linux-2.6.0-test9-bk17.orig/include/asm-i386/ioctl.h linux-2.6.0-test9-bk17/include/asm-i386/ioctl.h
--- linux-2.6.0-test9-bk17.orig/include/asm-i386/ioctl.h 2003-11-12 16:49:14.000000000 +0100
+++ linux-2.6.0-test9-bk17/include/asm-i386/ioctl.h 2003-11-12 16:51:38.000000000 +0100
@@ -52,9 +52,9 @@
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
/* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
((sizeof(t) == sizeof(t[1]) && \
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
sizeof(t) : __invalid_size_argument_for_IOC)
diff -rN -u4 linux-2.6.0-test9-bk17.orig/include/asm-parisc/ioctl.h linux-2.6.0-test9-bk17/include/asm-parisc/ioctl.h
--- linux-2.6.0-test9-bk17.orig/include/asm-parisc/ioctl.h 2003-11-12 16:49:14.000000000 +0100
+++ linux-2.6.0-test9-bk17/include/asm-parisc/ioctl.h 2003-11-12 16:51:24.000000000 +0100
@@ -44,9 +44,9 @@
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
/* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
((sizeof(t) == sizeof(t[1]) && \
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
sizeof(t) : __invalid_size_argument_for_IOC)
diff -rN -u4 linux-2.6.0-test9-bk17.orig/include/asm-ppc/ioctl.h linux-2.6.0-test9-bk17/include/asm-ppc/ioctl.h
--- linux-2.6.0-test9-bk17.orig/include/asm-ppc/ioctl.h 2003-11-12 16:49:14.000000000 +0100
+++ linux-2.6.0-test9-bk17/include/asm-ppc/ioctl.h 2003-11-12 16:51:34.000000000 +0100
@@ -37,9 +37,9 @@
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
/* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
((sizeof(t) == sizeof(t[1]) && \
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
sizeof(t) : __invalid_size_argument_for_IOC)
diff -rN -u4 linux-2.6.0-test9-bk17.orig/include/asm-ppc64/ioctl.h linux-2.6.0-test9-bk17/include/asm-ppc64/ioctl.h
--- linux-2.6.0-test9-bk17.orig/include/asm-ppc64/ioctl.h 2003-11-12 16:49:14.000000000 +0100
+++ linux-2.6.0-test9-bk17/include/asm-ppc64/ioctl.h 2003-11-12 16:51:28.000000000 +0100
@@ -42,9 +42,9 @@
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
/* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
((sizeof(t) == sizeof(t[1]) && \
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
sizeof(t) : __invalid_size_argument_for_IOC)
next reply other threads:[~2003-11-12 16:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-12 16:37 Johannes Stezenbach [this message]
2003-12-02 11:43 ` [PATCH] 2.6.0-test9 ioctl compile warnings in userspace Sven Luther
2003-12-03 12:56 ` Jörn Engel
2003-12-03 13:06 ` Sven Luther
2003-12-03 13:33 ` Jörn Engel
2003-12-03 14:09 ` Sven Luther
2003-12-03 14:34 ` Jörn Engel
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=20031112163750.GB18989@convergence.de \
--to=js@convergence.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox