[PATCH v1 0/5] Fix ostream format errors

Chris Johns chrisj at rtems.org
Wed Aug 4 22:46:33 UTC 2021


On 5/8/21 1:54 am, Ryan Long wrote:
> 
> The last "Restore ostream format" patch set didn't fix the Coverity issues.
> We verified that resetiosflags() will get rid of the issues complaints about
> std::left and std::right changing the stream's format, I noticed that it
> didn't complain if std::setfill(' ') was used after changing the setfill value
> to something else.
> 
> I don't know if Coverity will recognize storing the precision value and
> restoring it as a fix for the setprecision() calls, but the only other
> option is to just set the precision value to 6 (the default value).
> 

This patch is wrong. Please do not reset. You need to restore.

Chris


More information about the devel mailing list