summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-10-01 14:05:34 -0700
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-10-02 00:28:23 -0700
commit438666d6dba0e1ae888463cc9ad69a2f33738ce3 (patch)
tree32bdd4a32a480698f1622940aea082b17250ce59
parent20248f5682fe123c1e0497a3dc399d5507a74e2d (diff)
cleanup: fix warnings create by static wmxSDK_Nds_Cmn.h:wmxConnectProgressInfoName
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-rw-r--r--InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c6
-rw-r--r--InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h20
-rw-r--r--InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c2
3 files changed, 17 insertions, 11 deletions
diff --git a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c
index 84d51cf..7d52c61 100644
--- a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c
+++ b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c
@@ -210,8 +210,8 @@ void WMX_EXT_CALL_CONV NDnSAgent_SystemStateUpdate( wmx_pSystemStateUpdate syste
free(pSendIndData);
TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "NDnSAgent_SystemStateUpdate: SystemState=%s, ConnectState=%s, swRf=%d, hwRf=%d",
- NDnSSystemStates[systemStateUpdate->SystemState>=UnknownState?UnknownState:systemStateUpdate->SystemState],
- wmxConnectProgressInfoName[systemStateUpdate->ConnectProgress>=Registration?NotApplicable:systemStateUpdate->ConnectProgress],
+ NDnSSystemStates[systemStateUpdate->SystemState>=UnknownState?UnknownState:systemStateUpdate->SystemState],
+ wmxConnectProgressInfoName(systemStateUpdate->ConnectProgress>=Registration?NotApplicable:systemStateUpdate->ConnectProgress),
systemStateUpdate->rfSwitchesStatus.swRfStatus,
systemStateUpdate->rfSwitchesStatus.hwRfStatus);
@@ -429,4 +429,4 @@ void NDnSAgent_SupEventReport( wmx_SupEvent_t event )
}
break;
}
-} \ No newline at end of file
+}
diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
index 539dda9..f94eceb 100644
--- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
+++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h
@@ -234,13 +234,19 @@ typedef enum _wmx_ConnectProgressInfo_t
Registration
}wmx_ConnectProgressInfo_t, *wmx_pConnectProgressInfo_t;
-static char *wmxConnectProgressInfoName[] = {
- "NotApplicable",
- "Ranging",
- "SBC",
- "EAPAuthentication",
- "ThreeWayHandshake",
- "Registration"
+static inline
+const char * wmxConnectProgressInfoName(unsigned index)
+{
+ static const char *strs[] = {
+ "NotApplicable",
+ "Ranging",
+ "SBC",
+ "EAPAuthentication",
+ "ThreeWayHandshake",
+ "Registration"
+ };
+ static const unsigned index_max = sizeof(strs) / sizeof(strs[0]);
+ return index < index_max? strs[index] : "Illegal";
};
/// <summary>
diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c
index 022f4a7..196b7f0 100644
--- a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c
+++ b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c
@@ -103,7 +103,7 @@ wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetSystemState( wmx_pSystemSt
TRACE(TR_MOD_WRAPPER_LOGS, TR_SEV_NOTICE, "wmx_GetSystemState(OUT). SystemState=%s, ConnectState=%s, swRf=%d, hwRf=%d",
NDnSSystemStates[*systemState>=UnknownState?UnknownState:*systemState],
- wmxConnectProgressInfoName[*connectProgressInfo>=Registration?NotApplicable:*connectProgressInfo],
+ wmxConnectProgressInfoName(*connectProgressInfo>=Registration?NotApplicable:*connectProgressInfo),
rfSwitchesStatus->swRfStatus,
rfSwitchesStatus->hwRfStatus);
return WMX_ST_OK;