[Intel-gfx] [PATCH 3/5] xvmc: Silence gcc, add parentheses around arithmetic.
Julien Cristau
jcristau at debian.org
Mon Jan 31 10:55:13 CET 2011
On Mon, Jan 31, 2011 at 06:22:37 +0100, Cyril Brulebois wrote:
> Get rid of those accordingly with CFLAGS="-Wall -Werror":
> | CC i915_xvmc.lo
> | cc1: warnings being treated as errors
> | i915_xvmc.c: In function ‘i915_mc_one_time_state_emit’:
> | i915_xvmc.c:369: error: suggest parentheses around arithmetic in operand of ‘|’
> | i915_xvmc.c:374: error: suggest parentheses around arithmetic in operand of ‘|’
> | i915_xvmc.c:379: error: suggest parentheses around arithmetic in operand of ‘|’
> | i915_xvmc.c: In function ‘i915_mc_load_indirect_render_emit’:
> | i915_xvmc.c:708: error: suggest parentheses around arithmetic in operand of ‘|’
> | i915_xvmc.c:713: error: suggest parentheses around arithmetic in operand of ‘|’
>
> Signed-off-by: Cyril Brulebois <kibi at debian.org>
> ---
> src/xvmc/i915_xvmc.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
Could do:
diff --git a/src/xvmc/intel_batchbuffer.h b/src/xvmc/intel_batchbuffer.h
index 6fa1c05..ceb328c 100644
--- a/src/xvmc/intel_batchbuffer.h
+++ b/src/xvmc/intel_batchbuffer.h
@@ -24,7 +24,7 @@ extern int VERBOSE;
#define OUT_RELOC(bo,read_domains,write_domains,delta) \
do { \
- *(unsigned int *)batch_ptr = delta + bo->offset; \
+ *(unsigned int *)batch_ptr = (delta) + (bo)->offset; \
intel_batch_emit_reloc(bo, read_domains, write_domains, delta, batch_ptr); \
batch_ptr += 4; \
} while (0)
instead?
Cheers,
Julien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110131/e67dea2b/attachment.sig>
More information about the Intel-gfx
mailing list