diff options
author | Eric Anholt <eric@anholt.net> | 2013-10-08 00:23:29 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2013-10-14 14:32:59 -0700 |
commit | cde1ff2d7cfc0a27e6bcea0df5a3d0c48ad1c89f (patch) | |
tree | 1ca68af46066da0bc9d1c75009688cdf6b3660be | |
parent | eb69e251a8e6554555b921613eac222cae54ae4a (diff) |
mesa: Fix compiler warnings when ALIGN's alignment is "1 << value".
We hadn't run into order of operation warnings before, apparently, since
addition is so low on the order.
Cc: "9.1 9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit bfe6e5dda5fcf65a3941ed4cca5eea755421979a)
-rw-r--r-- | src/mesa/main/macros.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index ddfeee2262..f6466e8f5a 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -672,7 +672,7 @@ minify(unsigned value, unsigned levels) * * \sa ROUND_DOWN_TO() */ -#define ALIGN(value, alignment) (((value) + alignment - 1) & ~(alignment - 1)) +#define ALIGN(value, alignment) (((value) + (alignment) - 1) & ~((alignment) - 1)) |