Index: lib/libc/stdlib/_rand48.c =================================================================== RCS file: /cvsroot/src/lib/libc/stdlib/_rand48.c,v retrieving revision 1.8 diff -u -r1.8 _rand48.c --- lib/libc/stdlib/_rand48.c 22 Feb 2020 11:24:47 -0000 1.8 +++ lib/libc/stdlib/_rand48.c 22 Feb 2020 11:31:09 -0000 @@ -50,7 +50,9 @@ accu += (unsigned long) __rand48_mult[1] * (unsigned long) xseed[0]; temp[1] = (unsigned short) accu; /* middle 16 bits */ accu >>= sizeof(unsigned short) * 8; - accu += __rand48_mult[0] * xseed[2] + __rand48_mult[1] * xseed[1] + __rand48_mult[2] * xseed[0]; + accu += (int) (unsigned int) (__rand48_mult[0] * xseed[2]); + accu += (int) (unsigned int) (__rand48_mult[1] * xseed[1]); + accu += (int) (unsigned int) (__rand48_mult[2] * xseed[0]); xseed[0] = temp[0]; xseed[1] = temp[1]; xseed[2] = (unsigned short) accu;