<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9168">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Fix "left shift of 1 by 31 places cannot be represented in type 'int'" errors<br><br>Change-Id: I88e92be37caab399fc1d55f07699d601f6ea96c0<br>---<br>M src/mslot_class.c<br>1 file changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/68/9168/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/mslot_class.c b/src/mslot_class.c</span><br><span>index 2a482f1..6b311ea 100644</span><br><span>--- a/src/mslot_class.c</span><br><span>+++ b/src/mslot_class.c</span><br><span>@@ -239,7 +239,7 @@</span><br><span>           return -1;</span><br><span> </span><br><span>       for (tfi = 0; tfi < 32; tfi++) {</span><br><span style="color: hsl(0, 100%, 40%);">-             if (!(tfi_map & (1 << tfi)))</span><br><span style="color: hsl(120, 100%, 40%);">+                if (!(tfi_map & (1u << tfi)))</span><br><span>                      return tfi;</span><br><span>  }</span><br><span> </span><br><span>@@ -268,8 +268,8 @@</span><br><span> </span><br><span> bool mslot_test_and_set_bit(uint32_t *bits, size_t elem)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        bool was_set = bits[elem/32] & (1 << (elem % 32));</span><br><span style="color: hsl(0, 100%, 40%);">-    bits[elem/32] |= (1 << (elem % 32));</span><br><span style="color: hsl(120, 100%, 40%);">+    bool was_set = bits[elem/32] & (1u << (elem % 32));</span><br><span style="color: hsl(120, 100%, 40%);">+ bits[elem/32] |= (1u << (elem % 32));</span><br><span> </span><br><span>      return was_set;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9168">change 9168</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/9168"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I88e92be37caab399fc1d55f07699d601f6ea96c0 </div>
<div style="display:none"> Gerrit-Change-Number: 9168 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>