From: shuaitq <1101282468@qq.com>
To: libstdc++ <libstdc++@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] libstdc++: Fix fwrite error parameter
Date: Wed, 5 Jul 2023 23:53:47 +0800 [thread overview]
Message-ID: <tencent_59406776C6A285A57CE43CDDA7D5FD148D0A@qq.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
the first parameter of fwrite should be the const char* __s which want write to FILE *__file,
rather than the FILE *__file write to the FILE *__file.
[-- Attachment #2: 0001-Fix-fwrite-error-parameter.txt --]
[-- Type: application/octet-stream, Size: 858 bytes --]
From 5529c113ef053072100f00cbbae8a5cf833115eb Mon Sep 17 00:00:00 2001
From: shuaitq <1101282468@qq.com>
Date: Wed, 5 Jul 2023 23:05:56 +0800
Subject: [PATCH] libstdc++: Fix fwrite error parameter
---
libstdc++-v3/config/io/basic_file_stdio.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc
index 5501fbdd695..7de9d98c3c7 100644
--- a/libstdc++-v3/config/io/basic_file_stdio.cc
+++ b/libstdc++-v3/config/io/basic_file_stdio.cc
@@ -128,7 +128,7 @@ namespace
for (;;)
{
#ifdef _GLIBCXX_USE_STDIO_PURE
- const std::streamsize __ret = fwrite(__file, 1, __nleft, __file);
+ const std::streamsize __ret = fwrite(__s, 1, __nleft, __file);
#else
const std::streamsize __ret = write(__fd, __s, __nleft);
#endif
--
2.39.2 (Apple Git-143)
next reply other threads:[~2023-07-05 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 15:53 shuaitq [this message]
2023-07-05 16:06 ` Jonathan Wakely
2023-07-05 15:56 Tianqiang Shuai
2023-07-05 15:59 Tianqiang Shuai
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=tencent_59406776C6A285A57CE43CDDA7D5FD148D0A@qq.com \
--to=1101282468@qq.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).