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

Unified Diff: fusl/src/stdio/vfprintf.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/prng/__rand48_step.c ('k') | fusl/src/stdio/vfwprintf.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/stdio/vfprintf.c
diff --git a/fusl/src/stdio/vfprintf.c b/fusl/src/stdio/vfprintf.c
index 2ecf76925c97f3ee34faf03b3b23a6e5c1c2dc81..5724bf310abb50633ea80b5887e6734c799aec48 100644
--- a/fusl/src/stdio/vfprintf.c
+++ b/fusl/src/stdio/vfprintf.c
@@ -17,12 +17,12 @@
/* Convenient bit representation for modifier flags, which all fall
* within 31 codepoints of the space character. */
-#define ALT_FORM (1U<<'#'-' ')
-#define ZERO_PAD (1U<<'0'-' ')
-#define LEFT_ADJ (1U<<'-'-' ')
-#define PAD_POS (1U<<' '-' ')
-#define MARK_POS (1U<<'+'-' ')
-#define GROUPED (1U<<'\''-' ')
+#define ALT_FORM (1U<<('#'-' '))
+#define ZERO_PAD (1U<<('0'-' '))
+#define LEFT_ADJ (1U<<('-'-' '))
+#define PAD_POS (1U<<(' '-' '))
+#define MARK_POS (1U<<('+'-' '))
+#define GROUPED (1U<<('\''-' '))
#define FLAGMASK (ALT_FORM|ZERO_PAD|LEFT_ADJ|PAD_POS|MARK_POS|GROUPED)
@@ -485,8 +485,8 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
}
/* Read modifier flags */
- for (fl=0; (unsigned)*s-' '<32 && (FLAGMASK&(1U<<*s-' ')); s++)
- fl |= 1U<<*s-' ';
+ for (fl=0; (unsigned)*s-' '<32 && (FLAGMASK&(1U<<(*s-' '))); s++)
+ fl |= 1U<<(*s-' ');
/* Read field width */
if (*s=='*') {
« no previous file with comments | « fusl/src/prng/__rand48_step.c ('k') | fusl/src/stdio/vfwprintf.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698