public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fix fwrite error parameter
@ 2023-07-05 15:56 Tianqiang Shuai
  0 siblings, 0 replies; 4+ messages in thread
From: Tianqiang Shuai @ 2023-07-05 15:56 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- 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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libstdc++: Fix fwrite error parameter
  2023-07-05 15:53 shuaitq
@ 2023-07-05 16:06 ` Jonathan Wakely
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2023-07-05 16:06 UTC (permalink / raw)
  To: shuaitq; +Cc: libstdc++, gcc-patches

On Wed, 5 Jul 2023 at 16:54, shuaitq via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> 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.

Thank you. The patch is correct and small enough to not require a
copyright assignment or DCO sign-off, so I'll commit it for you.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] libstdc++: Fix fwrite error parameter
@ 2023-07-05 15:59 Tianqiang Shuai
  0 siblings, 0 replies; 4+ messages in thread
From: Tianqiang Shuai @ 2023-07-05 15:59 UTC (permalink / raw)
  To: libstdc++, gcc-patches


[-- Attachment #1.1: Type: text/plain, Size: 150 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: 866 bytes --]

From 5529c113ef053072100f00cbbae8a5cf833115eb Mon Sep 17 00:00:00 2001
From: Tianqiang Shuai <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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] libstdc++: Fix fwrite error parameter
@ 2023-07-05 15:53 shuaitq
  2023-07-05 16:06 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: shuaitq @ 2023-07-05 15:53 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- 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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-05 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 15:56 [PATCH] libstdc++: Fix fwrite error parameter Tianqiang Shuai
  -- strict thread matches above, loose matches on Subject: below --
2023-07-05 15:59 Tianqiang Shuai
2023-07-05 15:53 shuaitq
2023-07-05 16:06 ` Jonathan Wakely

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).