Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1600)

Unified Diff: fusl/src/prng/__rand48_step.c

Issue 1576423004: Remove -Wno-shift-op-parentheses for fusl build (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/multibyte/c16rtomb.c ('k') | fusl/src/stdio/vfprintf.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/prng/__rand48_step.c
diff --git a/fusl/src/prng/__rand48_step.c b/fusl/src/prng/__rand48_step.c
index 961d30fc9161e48dde6fc64a9c8aa10f19f5eee5..31270179785e9d4090cea3fe1acd83641aa2145a 100644
--- a/fusl/src/prng/__rand48_step.c
+++ b/fusl/src/prng/__rand48_step.c
@@ -3,8 +3,8 @@
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
{
uint64_t a, x;
- x = xi[0] | xi[1]+0U<<16 | xi[2]+0ULL<<32;
- a = lc[0] | lc[1]+0U<<16 | lc[2]+0ULL<<32;
+ x = xi[0] | ((uint32_t)xi[1])<<16 | ((uint64_t)xi[2])<<32;
+ a = lc[0] | ((uint32_t)lc[1])<<16 | ((uint64_t)lc[2])<<32;
x = a*x + lc[3];
xi[0] = x;
xi[1] = x>>16;
« no previous file with comments | « fusl/src/multibyte/c16rtomb.c ('k') | fusl/src/stdio/vfprintf.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698