Hello GNU Standards maintainers, I think this ticket is for you.
Best, Thérèse Le Dim 29 Mar 2020 09:34:16, [email protected] a écrit : > https://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting > > In the "before and after" parentheses formatting examples near the end > of this section: > > v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 > + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000; > > The tv_sec * 1000 multiplication for milliseconds overflows > on a platform where tv_sec is a 32 bit time_t. > > One possible fix is to cast one of the operands to the same 64 bit > type as the result v: > (uint64_t)rup->ru_utime.tv_sec * 1000 ... > > [A similar bug fix for a nanosecond calculation was accepted this > month in the embedded linux library ell. Unfortunately some of us are > still supporting platforms with 32 bit time_t Y2038 issues.] > > [Apologies if this is not the best most direct way to report this > documentation defect.]
