Fix misc-macro-parentheses warnings.

Add parentheses around macro arguments used beside binary operators.

Bug: 28705665
Change-Id: I8594b9463e2389a46d6e0235757b93de065cd007
This commit is contained in:
Chih-Hung Hsieh 2016-05-11 11:55:33 -07:00
parent 7ff7c2d870
commit f536e7ba34
1 changed files with 5 additions and 5 deletions

View File

@ -65,11 +65,11 @@ void to_565_raw_dither(int width)
out = to565(rb, gb, bb);
write(1, &out, 2);
#define apply_error(ch) { \
next_error[(i-1)*3+ch] += e * 3 / 16; \
next_error[(i)*3+ch] += e * 5 / 16; \
next_error[(i+1)*3+ch] += e * 1 / 16; \
error[(i+1)*3+ch] += e - ((e*1/16) + (e*3/16) + (e*5/16)); \
#define apply_error(ch) { \
next_error[(i-1)*3+(ch)] += e * 3 / 16; \
next_error[(i)*3+(ch)] += e * 5 / 16; \
next_error[(i+1)*3+(ch)] += e * 1 / 16; \
error[(i+1)*3+(ch)] += e - ((e*1/16) + (e*3/16) + (e*5/16)); \
}
e = r - from565_r(out);