Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/11656

to look at the new patch set (#3).

Change subject: use enums consistently instead of falling back to int
......................................................................

use enums consistently instead of falling back to int

The two existing enums defined in gprs_sndcp_xid.h, for protocol
and data compression algorithm numbers respectively, were assigned
to 'int' variables when their values were copied to other structures.

This prevented the compiler from checking the enum value coverage
during switch statements and also tripped up Coverity scans looking
for enum value mismatch problems.

So instead of copying enums to ints, make use of the enums throughout.
Structures which can contain values from both enums now use a union
of both, forcing us to be very explicit about which set of values
we are dealing with.

Change-Id: I3771a5c59f4e6fee24083b3c914965baf192cbd7
Depends: If6f3598cd6da4643ff2214e21c0d21f6eff0eb67
Depends: I8444c1ed052707c76a979fb06cb018ac678defa7
Related: CID#149102
---
M include/osmocom/sgsn/gprs_sndcp_comp.h
M include/osmocom/sgsn/gprs_sndcp_xid.h
M src/gprs/gprs_sndcp.c
M src/gprs/gprs_sndcp_comp.c
M src/gprs/gprs_sndcp_dcomp.c
M src/gprs/gprs_sndcp_pcomp.c
M src/gprs/gprs_sndcp_xid.c
M tests/sndcp_xid/sndcp_xid_test.c
8 files changed, 180 insertions(+), 88 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/56/11656/3
--
To view, visit https://gerrit.osmocom.org/11656
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3771a5c59f4e6fee24083b3c914965baf192cbd7
Gerrit-Change-Number: 11656
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling <ssperl...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <ssperl...@sysmocom.de>
Gerrit-CC: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to