| www.delorie.com/archives/browse.cgi | search |
| 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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; | |
| bh=eKxodiLfX40C6YBw/N43UwOpcOJ1KhPIOaWhvBxf+Is=; | |
| b=fHSwx8dEjzUsGiLc/Dx2GdB7eiAhjiZSe+fxNxjE2tJCpYbFNmQ+Iu8HYgq/Wde0DRF++rbSSQRH3xBgv940hKys7NEeoDkwChzdTCNHvEEJZ7yt6v+DyMPmsu+0UEmISb5YbEUWs12hGoUOI1da+r/92lpGB3dx3mAuQiWDMHI= | |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; |
| d=gmail.com; s=beta; | |
| h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; | |
| b=Oo3Xh3ncT9Rh9U5AoooUyFBQU+HZegbmR9PyjtbSPg+p3rDQTAgwbAnXLsw701Fytl47G18fK1GNFUWcODMdAunDRF8/rvFMHsNBLq3HmxHRcoNynVKPud/jTv34JFGeNdgvN3eSFXfew/0L030pGSRCheEzGoRqfscRkydr6j8= | |
| Message-ID: | <647fe9b10803271028t6b0800eck115caf78974987e1@mail.gmail.com> |
| Date: | Thu, 27 Mar 2008 19:28:29 +0200 |
| From: | "O.Sezer" <sezeroz AT gmail DOT com> |
| To: | djgpp-workers AT delorie DOT com |
| Subject: | Re: fnctl and ioctl warning fixes |
| In-Reply-To: | <200803271415.24740.juan.guerrero@gmx.de> |
| MIME-Version: | 1.0 |
| References: | <647fe9b10803261239p9e6c5afoc04f2458c6af3923 AT mail DOT gmail DOT com> |
| <200803271415 DOT 24740 DOT juan DOT guerrero AT gmx DOT de> | |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id m2RI9BJh019739 |
| Reply-To: | djgpp-workers AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp-workers AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
On 3/27/08, Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de> wrote:
> Am Mittwoch, 26. März 2008 20:39 schrieben Sie:
>
> > 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
>
> [snip]
>
>
> Thank you for proposing a solution for this issue.
> If we fix it in this way, we should also fix the documentation. Here is the
> verbatim copy of the example included by __FSEXT_get_function from fsext.txh:
>
> @example
> _read(int fd, void *buf, int len)
> @{
> __FSEXT_Function *func = __FSEXT_get_function(fd);
> if (func)
> @{
> int rv;
> if (func(__FSEXT_read, &rv, &fd)) <--- Here is the fault. fd is int instead of va_list.
> return rv;
> @}
> /* rest of read() */
> @}
> @end example
>
> As can be seen the example reproduces the faulty code identicaly. If we fix
> the code we should fix the documentation and we should document the wrapper
> functions too.
>
> Regards,
> Juan M. Guerrero
Yes I seem to have missed that, thanks.
If the fix goes in, a one liner can be done for this particular
one. No patch is necessary I guess?
Regards,
Ozkan Sezer
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |