clang compiler warnings: Fix -Wself-assign
authorMatthew Jordan <mjordan@digium.com>
Sat, 28 Mar 2015 12:48:45 +0000 (12:48 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sat, 28 Mar 2015 12:48:45 +0000 (12:48 +0000)
commitcb7b6bc4bee7f099bbf7c89b8b87f3cbe9c7725b
tree04359262c42ce64cf9b408e7943196ac40082b20
parente9520dbe0db9a4f3c5c2cd90a9740880b18d1e90
clang compiler warnings: Fix -Wself-assign

Assigning a variable to itself isn't super useful. However, the WAV format
modules make use of this in order to perform byte endian checks. This patch
works around the warning by only performing the self assignment if we are
going to do more than just assign it to ourselves. Which is odd, but true.

Review: https://reviewboard.asterisk.org/r/4544/

ASTERISK-24917
Reported by: dkdegroot
patches:
  rb4544.patch submitted by dkdegroot (License 6600)
........

Merged revisions 433690 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 433691 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
formats/format_wav.c
formats/format_wav_gsm.c