summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/macros.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-10-08 00:23:29 -0700
committerEric Anholt <eric@anholt.net>2013-10-09 11:28:19 -0700
commitbfe6e5dda5fcf65a3941ed4cca5eea755421979a (patch)
tree033744e22465d66a3ef28cc81d5b55766723e737 /src/mesa/main/macros.h
parent791550aa8e70dd5e0bdd5a996ef66b5964cf9095 (diff)
downloadexternal_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.h2
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))