diff options
author | Eric Anholt <[email protected]> | 2013-04-11 10:16:26 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-04-12 16:32:13 -0700 |
commit | b681a8958848d53f6f81f77d47674b996d9e8c20 (patch) | |
tree | baa7f5c982b48d2f1d95ee07661a5b0f0c3cf048 | |
parent | 1433936fe52489caa57079c8debf1138e956770d (diff) |
intel: Fix a warning in the release build.
This was silly -- checking that we didn't overflow the array by dividing
the array size by 2 and then multiplying it back up by 2.
Reviewed-by: Matt Turner <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index a21bc78b2d4..ba7d4b631f3 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -1056,7 +1056,6 @@ intel_query_dri2_buffers(struct intel_context *intel, struct gl_framebuffer *fb = drawable->driverPrivate; int i = 0; unsigned attachments[8]; - const int max_attachments = ARRAY_SIZE(attachments) / 2; struct intel_renderbuffer *front_rb; struct intel_renderbuffer *back_rb; @@ -1077,7 +1076,7 @@ intel_query_dri2_buffers(struct intel_context *intel, attachments[i++] = intel_bits_per_pixel(back_rb); } - assert(i <= 2 * max_attachments); + assert(i <= ARRAY_SIZE(attachments)); *buffers = screen->dri2.loader->getBuffersWithFormat(drawable, &drawable->w, |