aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-qsig.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-06-18 18:14:46 -0700
committerAnders Broman <a.broman58@gmail.com>2020-06-19 11:32:26 +0000
commite1d9a226a2b8f2824a0eb162a8dc972e6e6c2dd4 (patch)
tree75f56e3f0dde68ec92613cea3f482f7f426625de /epan/dissectors/packet-qsig.c
parent51bb2c4d7f515a24659ba0c0048392a81becda4e (diff)
Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-qsig.c')
-rw-r--r--epan/dissectors/packet-qsig.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c
index 29543fb83a..5f10f449e6 100644
--- a/epan/dissectors/packet-qsig.c
+++ b/epan/dissectors/packet-qsig.c
@@ -4321,7 +4321,7 @@ static int dissect_qsig_cc_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _
/* --- Module Call-Offer-Operations-asn1-97 --- --- --- */
-static const int * qsig_co_ServiceList_bits[] = {
+static int * const qsig_co_ServiceList_bits[] = {
&hf_qsig_co_ServiceList_callOffer,
NULL
};
@@ -4906,7 +4906,7 @@ dissect_qsig_dnd_DNDOverrideArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
}
-static const int * qsig_dnd_ServiceList_bits[] = {
+static int * const qsig_dnd_ServiceList_bits[] = {
&hf_qsig_dnd_ServiceList_spare_bit0,
&hf_qsig_dnd_ServiceList_dndo_low,
&hf_qsig_dnd_ServiceList_dndo_medium,
@@ -5081,7 +5081,7 @@ static int dissect_qsig_dnd_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo
/* --- Module Call-Intrusion-Operations-asn1-97 --- --- --- */
-static const int * qsig_ci_ServiceList_bits[] = {
+static int * const qsig_ci_ServiceList_bits[] = {
&hf_qsig_ci_ServiceList_spare_bit0,
&hf_qsig_ci_ServiceList_spare_bit1,
&hf_qsig_ci_ServiceList_spare_bit2,
@@ -6883,7 +6883,7 @@ static int dissect_qsig_cint_CintExtension_PDU(tvbuff_t *tvb _U_, packet_info *p
/* --- Module Common-Information-Operations-asn1-97 --- --- --- */
-static const int * qsig_cmn_FeatureIdList_bits[] = {
+static int * const qsig_cmn_FeatureIdList_bits[] = {
&hf_qsig_cmn_FeatureIdList_reserved,
&hf_qsig_cmn_FeatureIdList_ssCFreRoutingSupported,
&hf_qsig_cmn_FeatureIdList_ssCTreRoutingSupported,
@@ -9924,7 +9924,7 @@ dissect_qsig_sms_SmSubmitParameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
}
-static const int * qsig_sms_SmscControlParameterHeader_bits[] = {
+static int * const qsig_sms_SmscControlParameterHeader_bits[] = {
&hf_qsig_sms_SmscControlParameterHeader_sRforTransactionCompleted,
&hf_qsig_sms_SmscControlParameterHeader_sRforPermanentError,
&hf_qsig_sms_SmscControlParameterHeader_sRforTempErrorSCnotTrying,