<p>Stefan Sperling <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/11656">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">use enums consistently instead of falling back to int<br><br>The two existing enums defined in gprs_sndcp_xid.h, for protocol<br>and data compression algorithm numbers respectively, were assigned<br>to 'int' variables when their values were copied to other structures.<br><br>This prevented the compiler from checking the enum value coverage<br>during switch statements and also tripped up Coverity scans looking<br>for enum value mismatch problems.<br><br>So instead of copying enums to ints, make use of the enums throughout.<br>Structures which can contain values from both enums now use a union<br>of both, forcing us to be very explicit about which set of values<br>we are dealing with.<br><br>Change-Id: I3771a5c59f4e6fee24083b3c914965baf192cbd7<br>Depends: If6f3598cd6da4643ff2214e21c0d21f6eff0eb67<br>Depends: I8444c1ed052707c76a979fb06cb018ac678defa7<br>Related: CID#149102<br>---<br>M include/osmocom/sgsn/gprs_sndcp_comp.h<br>M include/osmocom/sgsn/gprs_sndcp_xid.h<br>M src/gprs/gprs_sndcp.c<br>M src/gprs/gprs_sndcp_comp.c<br>M src/gprs/gprs_sndcp_dcomp.c<br>M src/gprs/gprs_sndcp_pcomp.c<br>M src/gprs/gprs_sndcp_xid.c<br>M tests/sndcp_xid/sndcp_xid_test.c<br>8 files changed, 180 insertions(+), 88 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/56/11656/3</pre><p>To view, visit <a href="https://gerrit.osmocom.org/11656">change 11656</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/11656"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I3771a5c59f4e6fee24083b3c914965baf192cbd7 </div>
<div style="display:none"> Gerrit-Change-Number: 11656 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Stefan Sperling <ssperling@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Stefan Sperling <ssperling@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>