public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@convergence.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ioctl compile warnings in userspace
Date: Fri, 7 Nov 2003 18:32:05 +0100	[thread overview]
Message-ID: <20031107173205.GA4425@convergence.de> (raw)

Hi,

Debian unstable now has glibc 2.3.2 and includes kernel headers
from "2.5.999-test7-bk-8".

$ gcc --version
gcc (GCC) 3.3.2 (Debian)


When compiling my DVB test programs I get warnings like:

  test_stc.c:64: warning: signed and unsigned type in conditional expression

with test_stc.c:64 being:

        if (ioctl(dmxfd, DMX_GET_STC, &stc) == -1) {

Patch below fixes it for i386, but there are more platforms
which need fixing.


diff -ru linux-2.6.0-test9-bk8/include/asm-i386/ioctl.h linux-2.6.0-test9-bk8-fix/include/asm-i386/ioctl.h
--- linux-2.6.0-test9-bk8/include/asm-i386/ioctl.h	2003-11-07 18:03:23.000000000 +0100
+++ linux-2.6.0-test9-bk8-fix/include/asm-i386/ioctl.h	2003-11-07 18:03:53.000000000 +0100
@@ -53,7 +53,7 @@
 	 ((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)) ? \


Johannes

             reply	other threads:[~2003-11-08  0:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-07 17:32 Johannes Stezenbach [this message]
2003-11-09 13:24 ` [PATCH] ioctl compile warnings in userspace Sven Luther

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=20031107173205.GA4425@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