]> git.ozlabs.org Git - ccan/commitdiff
endian: Wrap arguments in braces to silence warnings
authorJoel Stanley <joel@jms.id.au>
Thu, 14 Aug 2014 03:37:53 +0000 (13:37 +1000)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 15 Aug 2014 18:23:56 +0000 (03:53 +0930)
When using the endian swapping marcos with multiple arguments that are
or'd together:

  CPU_TO_BE64(THIS_THING | THAT_THING)

gcc will emit this warning:

  warning: suggest parentheses around arithmetic in operand
  of ‘|’ [-Wparentheses]

Wrap the arugments in braces to avoid this.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

No differences found