diff options
author | wm4 <wm4@nowhere> | 2015-03-04 11:43:02 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-03-05 10:47:14 +0900 |
commit | 3d3b1b8bbaf5e14703ed632bb5069c052149d867 (patch) | |
tree | 3a953d4e073c1328ece6cdea0a7dac5d4c9a56e6 | |
parent | 21a90cc49c6e71da9d52451015297afe42cd8b6e (diff) | |
download | mpv-3d3b1b8bbaf5e14703ed632bb5069c052149d867.tar.bz2 mpv-3d3b1b8bbaf5e14703ed632bb5069c052149d867.tar.xz |
win32: fix some more -Wparentheses warnings
Stupid compiler.
For decode_surrogate_pair(), I changed the order of evaluation; it
shouldn't matter, but this order is more readable in my opinion.
(cherry picked from commit 85bf102f54cfae9945d26f1edc0e642975881dfa)
-rw-r--r-- | options/path.c | 4 | ||||
-rw-r--r-- | video/out/vo_direct3d.c | 2 | ||||
-rw-r--r-- | video/out/w32_common.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/options/path.c b/options/path.c index 6ae0fc4d11..2b2bb3d272 100644 --- a/options/path.c +++ b/options/path.c @@ -240,7 +240,7 @@ char *mp_path_join(void *talloc_ctx, struct bstr p1, struct bstr p2) return bstrdup0(talloc_ctx, p1); #if HAVE_DOS_PATHS - if (p2.len >= 2 && p2.start[1] == ':' + if ((p2.len >= 2 && p2.start[1] == ':') || p2.start[0] == '\\' || p2.start[0] == '/') #else if (p2.start[0] == '/') @@ -251,7 +251,7 @@ char *mp_path_join(void *talloc_ctx, struct bstr p1, struct bstr p2) int endchar1 = p1.start[p1.len - 1]; #if HAVE_DOS_PATHS have_separator = endchar1 == '/' || endchar1 == '\\' - || p1.len == 2 && endchar1 == ':'; // "X:" only + || (p1.len == 2 && endchar1 == ':'); // "X:" only #else have_separator = endchar1 == '/'; #endif diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index 88eb619b8a..82a6363a62 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -940,7 +940,7 @@ render_osd: // Return the high byte of the value that represents white in chroma (U/V) static int get_chroma_clear_val(int bit_depth) { - return 1 << (bit_depth - 1 & 7); + return 1 << ((bit_depth - 1) & 7); } // this macro is supposed to work on all formats supported by 3D rendering, and diff --git a/video/out/w32_common.c b/video/out/w32_common.c index b788054070..4959b39bca 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -403,7 +403,7 @@ static int mod_state(struct vo_w32_state *w32) static int decode_surrogate_pair(wchar_t lead, wchar_t trail) { - return 0x10000 + ((lead & 0x3ff) << 10) | (trail & 0x3ff); + return 0x10000 + (((lead & 0x3ff) << 10) | (trail & 0x3ff)); } static int decode_utf16(struct vo_w32_state *w32, wchar_t c) |