Fix cfg for std::xstream::write() (#4778)

This commit is contained in:
chrchr-github 2023-02-08 08:59:13 +01:00 committed by GitHub
parent 271ccbc8f3
commit 0dddba3bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -6539,7 +6539,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg> </arg>
<arg nr="2" direction="in"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
<valid>1:</valid> <valid>0:</valid>
</arg> </arg>
</function> </function>
<!--std::ostringstream& std::ostringstream::write (const char* s, streamsize n);--> <!--std::ostringstream& std::ostringstream::write (const char* s, streamsize n);-->
@ -6554,7 +6554,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg> </arg>
<arg nr="2" direction="in"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
<valid>1:</valid> <valid>0:</valid>
</arg> </arg>
</function> </function>
<!--std::ostream& std::ostream::write (const char* s, streamsize n);--> <!--std::ostream& std::ostream::write (const char* s, streamsize n);-->
@ -6569,7 +6569,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg> </arg>
<arg nr="2" direction="in"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
<valid>1:</valid> <valid>0:</valid>
</arg> </arg>
</function> </function>
<!--std::fstream& std::fstream::write (const char* s, streamsize n);--> <!--std::fstream& std::fstream::write (const char* s, streamsize n);-->
@ -6584,7 +6584,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg> </arg>
<arg nr="2" direction="in"> <arg nr="2" direction="in">
<not-uninit/> <not-uninit/>
<valid>1:</valid> <valid>0:</valid>
</arg> </arg>
</function> </function>
<!-- void std::vector::assign( size_type count, const T& value ); --> <!-- void std::vector::assign( size_type count, const T& value ); -->

View File

@ -4458,6 +4458,11 @@ void getline()
in.close(); in.close();
} }
void stream_write(std::ofstream& s, std::vector<char> v) {
if (v.empty()) {}
s.write(v.data(), v.size());
}
void stdstring() void stdstring()
{ {
std::string s; std::string s;