Fix 'dereferencing type-punned pointer will break strict-aliasing rules' warning when compiling with gcc 4.1.3

svn path=/trunk/; revision=43768
This commit is contained in:
Pascal Quantin 2012-07-17 14:55:27 +00:00
parent 83a22a220a
commit c2883b7be2
3 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ enum nas_sys_info_gsm_map {
RRC_NAS_SYS_INFO_CN_COMMON
};
static enum nas_sys_info_gsm_map rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
static guint32 rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
/* Forward declarations */
static int dissect_UE_RadioAccessCapabilityInfo_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);

View File

@ -606,7 +606,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
proto_tree_add_unicode_string(tree, hf_index, hnbname_tvb, 0, -1,
tvb_get_ephemeral_string_enc(hnbname_tvb, 0, tvb_length(hnbname_tvb), ENC_UTF_8 | ENC_NA));
#.FN_BODY CN-DomainIdentity VAL_PTR = (guint32*)(&rrc_nas_sys_info_gsm_map_type)
#.FN_BODY CN-DomainIdentity VAL_PTR = &rrc_nas_sys_info_gsm_map_type
%(DEFAULT_BODY)s
#.FN_BODY CN-InformationInfo/cn-CommonGSM-MAP-NAS-SysInfo

View File

@ -76,7 +76,7 @@ enum nas_sys_info_gsm_map {
RRC_NAS_SYS_INFO_CN_COMMON
};
static enum nas_sys_info_gsm_map rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
static guint32 rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
/* Forward declarations */
static int dissect_UE_RadioAccessCapabilityInfo_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
@ -15245,7 +15245,7 @@ static int
dissect_rrc_CN_DomainIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 610 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
2, (guint32*)(&rrc_nas_sys_info_gsm_map_type), FALSE, 0, NULL);
2, &rrc_nas_sys_info_gsm_map_type, FALSE, 0, NULL);