Add support for std::ofstream::precision() (#4485)

* Add support for std::copy_n/merge/stable_sort

* Format

* Add support for std::unordered_set::count(), std::push_heap

* Missing include

* Add support for std::iota

* Missing include

* Add support for std::ofstream::precision()

* Typo

* Typo
This commit is contained in:
chrchr-github 2022-09-20 17:23:18 +02:00 committed by GitHub
parent 2ce25abd81
commit 48999cf1d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -6388,7 +6388,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<!--std::streamsize std::ios_base::precision(streamsize prec)-->
<!--std::streamsize std::ostringstream::precision(streamsize prec)-->
<!--std::streamsize std::ostream::precision(streamsize prec)-->
<function name="std::ios_base::precision,std::ostringstream::precision,std::ostream::precision">
<function name="std::ios_base::precision,std::ostringstream::precision,std::ostream::precision,std::ofstream::precision">
<noreturn>false</noreturn>
<returnValue type="std::streamsize"/>
<leak-ignore/>

View File

@ -402,6 +402,13 @@ void uninitvar_std_ofstream_open(std::ofstream &os, const std::string &strFileNa
os.open(ptr);
}
void uninitvar_std_ofstream_precision(std::ofstream& os)
{
std::streamsize s;
// cppcheck-suppress uninitvar
os.precision(s);
}
void nullPointer_std_filebuf_open(std::filebuf &fb, const std::string &strFileName, const char* filename, std::ios_base::openmode mode)
{
// cppcheck-suppress nullPointer