]> git.ozlabs.org Git - ccan/commit
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)
commit6b8e498bd74a39afd2da684b93bbba783aa11b18
tree3e415dc6cbd6a69cabd08fcab6b869d5f8b4fbe8
parent54f85c236ad6f04734cda522ffb78bce7be824bf
endian: Wrap arguments in braces to silence warnings

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>
ccan/endian/endian.h