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

Unified Diff: fusl/src/locale/iconv.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/include/endian.h ('k') | fusl/src/malloc/malloc.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/locale/iconv.c
diff --git a/fusl/src/locale/iconv.c b/fusl/src/locale/iconv.c
index 1eeea94e0a38753691269b978f105b5e65ee33b8..00b6ce44ec92b83e1f26f3ea8836df4e07ac128e 100644
--- a/fusl/src/locale/iconv.c
+++ b/fusl/src/locale/iconv.c
@@ -135,7 +135,7 @@ static void put_16(unsigned char *s, unsigned c, int e)
static unsigned get_32(const unsigned char *s, int e)
{
e &= 3;
- return s[e]+0U<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3];
+ return ((unsigned)s[e])<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3];
}
static void put_32(unsigned char *s, unsigned c, int e)
@@ -366,7 +366,7 @@ size_t iconv(iconv_t cd0, char **restrict in, size_t *restrict inb, char **restr
if (c < 128+type) break;
c -= 128+type;
c = legacy_chars[ map[c*5/4]>>2*c%8 |
- map[c*5/4+1]<<8-2*c%8 & 1023 ];
+ map[c*5/4+1]<<(8-2*c%8) & 1023 ];
if (!c) c = *(unsigned char *)*in;
if (c==1) goto ilseq;
}
@@ -401,7 +401,7 @@ size_t iconv(iconv_t cd0, char **restrict in, size_t *restrict inb, char **restr
d = c;
for (c=0; c<128-totype; c++) {
if (d == legacy_chars[ tomap[c*5/4]>>2*c%8 |
- tomap[c*5/4+1]<<8-2*c%8 & 1023 ]) {
+ tomap[c*5/4+1]<<(8-2*c%8) & 1023 ]) {
c += 128;
goto revout;
}
« no previous file with comments | « fusl/include/endian.h ('k') | fusl/src/malloc/malloc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698