<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7853">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">codec_gsm: Avoid shifting a negative signed value.<br><br>clang 5.0 warned about this.<br><br>ASTERISK-27558<br><br>Change-Id: Icc452ecb0d86bbeba78dae768cc472ec540699df<br>---<br>M codecs/gsm/src/short_term.c<br>1 file changed, 8 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/53/7853/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/codecs/gsm/src/short_term.c b/codecs/gsm/src/short_term.c<br>index 4172d32..d22d276 100644<br>--- a/codecs/gsm/src/short_term.c<br>+++ b/codecs/gsm/src/short_term.c<br>@@ -55,21 +55,21 @@<br> */<br> <br> #undef STEP<br>-#define STEP( B, MIC, INVA ) \<br>+#define STEP( B_TIMES_TWO, MIC, INVA ) \<br> temp1 = GSM_ADD( *LARc++, MIC ) << 10; \<br>- temp1 = GSM_SUB( temp1, B << 1 ); \<br>+ temp1 = GSM_SUB( temp1, B_TIMES_TWO ); \<br> temp1 = (word)GSM_MULT_R( INVA, temp1 ); \<br> *LARpp++ = GSM_ADD( temp1, temp1 );<br> <br> STEP( 0, -32, 13107 );<br> STEP( 0, -32, 13107 );<br>- STEP( 2048, -16, 13107 );<br>- STEP( -2560, -16, 13107 );<br>+ STEP( 4096, -16, 13107 );<br>+ STEP( -5120, -16, 13107 );<br> <br>- STEP( 94, -8, 19223 );<br>- STEP( -1792, -8, 17476 );<br>- STEP( -341, -4, 31454 );<br>- STEP( -1144, -4, 29708 );<br>+ STEP( 188, -8, 19223 );<br>+ STEP( -3584, -8, 17476 );<br>+ STEP( -682, -4, 31454 );<br>+ STEP( -2288, -4, 29708 );<br> <br> /* NOTE: the addition of *MIC is used to restore<br> * the sign of *LARc.<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7853">change 7853</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7853"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Icc452ecb0d86bbeba78dae768cc472ec540699df </div>
<div style="display:none"> Gerrit-Change-Number: 7853 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>