public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libc: fix fropen/fwopen compile warnings Date: Wed, 7 Dec 2022 12:20:14 +0000 (GMT) [thread overview] Message-ID: <20221207122014.74B2F383F22E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0b09753a3f0c17164c877cf5ae9ebbc617bcf302 commit 0b09753a3f0c17164c877cf5ae9ebbc617bcf302 Author: Alexey Lapshin <alexey.lapshin@espressif.com> AuthorDate: Wed Dec 7 10:59:23 2022 +0000 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Wed Dec 7 13:10:24 2022 +0100 libc: fix fropen/fwopen compile warnings This patch fixes warnings that appears when compiling: #define fwopen(__cookie,__fn) funopen(__cookie, (int (*)())0, __fn, (fpos_t (*)())0, (int (*)())0) Expands to: funopen(__null, (int (*)())0, &app_printf, (fpos_t (*)())0, (int (*)())0) argument of type "int (*)()" is incompatible with parameter of type "int (*)(void *__cookie, char *__buf, int __n)"C/C++(167) invalid conversion from 'fpos_t (*)()' {aka 'long int (*)()'} to 'fpos_t (*)(void*, fpos_t, int)' {aka 'long int (*)(void*, Discussion is here: https://github.com/espressif/arduino-esp32/issues/7407 Diff: --- newlib/libc/include/stdio.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index ea4ddf3293d0..77966578d802 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -620,10 +620,8 @@ FILE *_funopen_r (struct _reent *, const void *__cookie, int (*__closefn)(void *__cookie)); # endif /* !__LARGE64_FILES */ -# define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \ - (fpos_t (*)())0, (int (*)())0) -# define fwopen(__cookie, __fn) funopen(__cookie, (int (*)())0, __fn, \ - (fpos_t (*)())0, (int (*)())0) +# define fropen(__cookie, __fn) funopen(__cookie, __fn, NULL, NULL, NULL) +# define fwopen(__cookie, __fn) funopen(__cookie, NULL, __fn, NULL, NULL) #endif /* __BSD_VISIBLE */ #if __GNU_VISIBLE
reply other threads:[~2022-12-07 12:20 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221207122014.74B2F383F22E@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).