[PATCH] ioctl compile warnings in userspace

From: Johannes Stezenbach (js_at_convergence.de)
Date: 11/07/03

  • Next message: Valdis.Kletnieks_at_vt.edu: "kernel: ipt_hook: happy cracking."
    Date:	Fri, 7 Nov 2003 18:32:05 +0100
    To: Linus Torvalds <torvalds@osdl.org>
    
    

    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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Valdis.Kletnieks_at_vt.edu: "kernel: ipt_hook: happy cracking."

    Relevant Pages

    • Re: Anyone interested in building a vms-like OS?
      ... then you have a good reason for preferring the BSD license over GPL. ... geeks :-) is that it is fast, 5-10 times faster than gcc, while still ... Compiling 10 times faster with almost no optimization does not ... It is compiling much faster but doing less optimizations. ...
      (comp.os.vms)
    • Conexant HCF Modem Problems
      ... Conexant HCF modem, which is a "controllerless" modem, not a HSF which ... files to compile and to install but the problem is when I try to config ... compiling (gcc) mod_osspec.c ...
      (comp.os.linux.hardware)
    • [ANN] macstl 0.1.5 -- Xcode compatibility
      ... The new version also has fixes for older gcc ... Now builds with Xcode 1.0. ... Fixed altivec functions not compiling in gcc 3.1: ...
      (comp.lang.cpp)
    • Re: Finally one site with all the C fundas
      ... was pretty lenient and we did not actively pursue compiling the tool ... the CPU/memory architecture doesn't allow unaligned accesses. ... Also gcc 3.3.6 would have spotted that if invoked with the '-W' ... Casting the return value of mallocis never necessary ...
      (comp.lang.c)
    • Re: A bug in gnat/gcc 3.3.3?
      ... > Compiling ASIS and GLADE for a newer version isn't that difficult - ... harping on GCC 3.4, but I'd like reports about ASIS and GLADE for GCC ... GCC 3.4 does not "have" PolyORB, ...
      (comp.lang.ada)