diff options
author | Eric Anholt <eric@anholt.net> | 2013-10-08 00:23:29 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-10-09 11:28:19 -0700 |
commit | bfe6e5dda5fcf65a3941ed4cca5eea755421979a (patch) | |
tree | 033744e22465d66a3ef28cc81d5b55766723e737 /src/mesa/main/macros.h | |
parent | 791550aa8e70dd5e0bdd5a996ef66b5964cf9095 (diff) | |
download | external_mesa3d-bfe6e5dda5fcf65a3941ed4cca5eea755421979a.zip external_mesa3d-bfe6e5dda5fcf65a3941ed4cca5eea755421979a.tar.gz external_mesa3d-bfe6e5dda5fcf65a3941ed4cca5eea755421979a.tar.bz2 |
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>
Diffstat (limited to 'src/mesa/main/macros.h')
-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 1052f75..05aad4e 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -673,7 +673,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)) |