Opened 7 years ago
Closed 7 years ago
#54 closed defect (fixed)
Superfluous warning for unused timer formal parameters
Reported by: | phdmakk | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | v2.0.0 Series |
Component: | T3Q | Version: | 2.0 |
Keywords: | Cc: |
Description
The issue seems to be related to incorrect search for timer references.
Original report:
The error reported is:
"..\ttcn\IMS\19\IMS_CC_EmergencyCallTestcases.ttcn: 48: WARNING: Code Style: Formal parameter "p_TRegExpireMax" in definition for "fl_IMS_EmergencyReRegistration" is never used! (6.11, checkNoUnusedFormalParameters)"
But within fl_IMS_EmergencyReRegistration the timer p_TRegExpireMax gets stopped i.e. it is used, probably stopping of a timer is not considered correctly by T3Qv2 on this rule as stopping it should be considered using the variable.
On the same delivery mentioned below, on ATS IMS_Testsuite_EUTRA, you can find on module "..\IMS_EUTRA_IWD_17wk10\IMS\19\IMS_CC_EmergencyCallTestcases.ttcn", line 83, the mentioned object fl_IMS_EmergencyReRegistration.
The code snippet of the function below:
============================================================================
/*
- @desc Emergency Reregistration
- @param p_OldSecNotRequired (default value: true)
- @param p_RegisterExpiration (default value: tsc_IMS_RegisterExpiration)
- @param p_TRegExpireMax
- @return REGISTER_Request
- @status APPROVED (IMS)
*/
function fl_IMS_EmergencyReRegistration(boolean p_OldSecNotRequired := true,
charstring p_RegisterExpiration := tsc_IMS_RegisterExpiration,
timer p_TRegExpireMax) runs on IMS_PTC return REGISTER_Request @sic R5-140037 sic@ @sic R5s160427 sic@
{
var IMS_DATA_REQ v_IMS_DATA_REQ;
var SecurityClientParams_Type v_SecurityClientParams;
var REGISTER_Request v_RegisterReq;
var boolean v_IsEmergency := true;
var integer v_NonceCount;
var template (value) IMS_RoutingInfo_Type v_RoutingInfo;
v_NonceCount := 2;
v_IMS_DATA_REQ := f_IMS_REGISTER_SubsequentRequest(-, v_IsEmergency, v_NonceCount);
v_RegisterReq := v_IMS_DATA_REQ.Request.Register;
p_TRegExpireMax.stop; @sic R5s160427 sic@
v_SecurityClientParams := f_IMS_PTC_ReRegistration_SecurityClientParamsGet();
f_IMS_Register_SecurityInit(v_RegisterReq, not4b tsc_IMS_AuthRAND); /* generate a new RAND */
v_RoutingInfo := f_IMS_RoutingInfo_ULtoDL(v_IMS_DATA_REQ.RoutingInfo?);
IMS_Server.send(cas_IMS_DATA_RSP(v_RoutingInfo, cs_Response(c_statusLine401, f_IMS_RegisterResponse401MessageHeaderTX(v_RegisterReq))));
v_NonceCount := 1; nonce counter is reset to 1 due to re-authentication
v_IMS_DATA_REQ := f_IMS_REGISTER_SubsequentRequest(-, v_IsEmergency, v_NonceCount);
v_RegisterReq := v_IMS_DATA_REQ.Request.Register;
v_RoutingInfo := f_IMS_RoutingInfo_ULtoDL(v_IMS_DATA_REQ.RoutingInfo?); /* @sic R5s141326, R5s150245 change 1 sic@ */
if (p_OldSecNotRequired) { @sic R5s141335 sic@
f_IMS_Register_SecurityRelease(); @sic R5s140909; R5w150015: v_SecurityInfo is removed sic@
v_RoutingInfo.Security := protectedContext1; /* @sic R5s141326: by releasing the old security context the new one becomes context 1; R5s150245 change 1 sic@ */
}
IMS_Server.send(cas_IMS_DATA_RSP(v_RoutingInfo, cs_Response(c_statusLine200, f_IMS_RegisterResponse200MessageHeaderTX(v_RegisterReq, v_IsEmergency, p_RegisterExpiration)))); /* @sic R5s150809 sic@ */
return v_RegisterReq;
}
Change History (2)
comment:1 Changed 7 years ago by phdmakk
- Milestone changed from v1.1.x Series to v2.0.0 Series
- Version changed from 1.0 to 2.0
comment:2 Changed 7 years ago by phdmakk
- Resolution set to fixed
- Status changed from new to closed