Mail Archives: djgpp-workers/2008/03/26/14:39:31
| X-Authentication-Warning:  | delorie.com: mail set sender to djgpp-workers-bounces using -f
 | 
| X-Recipient:  | djgpp-workers AT delorie DOT com
 | 
| DKIM-Signature:  | v=1; a=rsa-sha256; c=relaxed/relaxed;
 | 
 | d=gmail.com; s=beta;
 | 
 | h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
 | 
 | bh=GeyeinWCQPX6YsOMPo1TOpEybJDUjqosjUaurVT8R2M=;
 | 
 | b=rV/P79j5QRMm6s4714g9lu8kx010eUvEuHcSEGPUjtUCmA6lno9xlr1aOpxxn9QQkVbwAjxL+R39pPpeEMH4EpJvDkHRkXyMkfQ+ZAlMgBf3RQyIWgOoZ3RuxqHv1vTgP1gLb6MPne1CDYMQu+SR8jXMnqalmvzzkWARyFjxaWs=
 | 
| DomainKey-Signature:  | a=rsa-sha1; c=nofws;
 | 
 | d=gmail.com; s=beta;
 | 
 | h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
 | 
 | b=fL5egCbFwW1r5yfFvqKIGz3Jq0aAD1fo98qj6tz04ma3Z8Y78k8g7mwtGSC9bF8Ry4wqwygeLSQuiqQW+1Ma09EJQbcHTgYv4N6okYnF7ccnaHIGdjIko8WwQZkmoaJEJ30ZvYNQYPGghXC660uN16hauMpf2xE26H+DbLB24jI=
 | 
| Message-ID:  | <647fe9b10803261239p9e6c5afoc04f2458c6af3923@mail.gmail.com>
 | 
| Date:  | Wed, 26 Mar 2008 21:39:24 +0200
 | 
| From:  | "O.Sezer" <sezeroz AT gmail DOT com>
 | 
| To:  | djgpp-workers AT delorie DOT com
 | 
| Subject:  | fnctl and ioctl warning fixes
 | 
| MIME-Version:  | 1.0
 | 
| Reply-To:  | djgpp-workers AT delorie DOT com
 | 
The attached patch fixes the following three warnings by
employing the __FSEXT_func_wrapper inline helper:
ioctl.c: In function `_unix_ioctl':
ioctl.c:269: warning: passing arg 3 of pointer to function from
incompatible pointer type
ioctl.c: In function `ioctl':
ioctl.c:325: warning: passing arg 3 of pointer to function from
incompatible pointer type
fcntl.c: In function `fcntl':
fcntl.c:277: warning: passing arg 3 of pointer to function from
incompatible pointer type
Regards,
Ozkan Sezer
diff -urNp djgpp/src/libc/compat/ioctl/ioctl.c~
djgpp/src/libc/compat/ioctl/ioctl.c
--- djgpp/src/libc/compat/ioctl/ioctl.c~ 2003-05-30 23:20:00.000000000 +0300
+++ djgpp/src/libc/compat/ioctl/ioctl.c	2008-03-26 21:27:16.000000000 +0200
@@ -120,6 +120,7 @@ import djgpp 2.02
 #include <stdarg.h>
 #include <stdlib.h>
 #include <sys/fsext.h>
+#include <libc/fsexthlp.h>
 #include <sys/ioctl.h>
 #include <libc/farptrgs.h>
@@ -266,7 +267,7 @@ static int _unix_ioctl(int fd, int cmd,
   if(func)
   {
     int rv;
-    if (func(__FSEXT_ioctl,&rv, &fd))
+    if (__FSEXT_func_wrapper(func, __FSEXT_ioctl, &rv, fd))
        return rv;
   }
@@ -322,7 +323,7 @@ int ioctl(int fd, int cmd, ...)
    ** see if this is a file system extension file
    **
    */
-  if (func && func(__FSEXT_ioctl, &rv, &fd))
+  if (func && __FSEXT_func_wrapper(func, __FSEXT_ioctl, &rv, fd))
     return rv;
   va_start(args, cmd);
diff -urNp djgpp/src/libc/posix/fcntl/fcntl.c~
djgpp/src/libc/posix/fcntl/fcntl.c
--- djgpp/src/libc/posix/fcntl/fcntl.c~ 2003-03-27 07:08:44.000000000 +0200
+++ djgpp/src/libc/posix/fcntl/fcntl.c  2008-03-26 21:26:48.000000000 +0200
@@ -12,6 +12,7 @@
 #include <fcntl.h>
 #include <io.h>
 #include <sys/fsext.h>
+#include <libc/fsexthlp.h>
 #include <sys/movedata.h>
 #include <libc/farptrgs.h>
 #include <libc/dosio.h>
@@ -274,7 +275,7 @@ fcntl(int fd, int cmd, ...)
   if (func)
   {
     int rv;
-    if (func(__FSEXT_fcntl, &rv, &fd))
+    if (__FSEXT_func_wrapper(func, __FSEXT_fcntl, &rv, fd))
       return rv;
   }
- Raw text -