From 7dd105062b6fb85112027c270cbf38abd5f34fe2 Mon Sep 17 00:00:00 2001
From: Lionel Gauthier <lionel.gauthier@eurecom.fr>
Date: Thu, 30 Apr 2015 09:44:13 +0000
Subject: [PATCH] Sebastian Held
 patches15/0034-fixed-compiler-warning-about-64-bit-arch-problems.patch

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7336 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 .../GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h  |  2 +-
 openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h   |  8 ++++----
 openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c      | 16 ++++++++--------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h b/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h
index 3afd953a92..5cd030feb9 100644
--- a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h
+++ b/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h
@@ -80,7 +80,7 @@ extern "C" {
 
 typedef struct NwGtpv1uStack {
   NwU32T                        stackType;/**< GTPU_STACK_ENB or GTPU_STACK_SGW   */
-  NwU32T                        id;
+  NwPtrT                        id;
   NwU32T                        seq;
   NwGtpv1uUlpEntityT            ulp;
   NwGtpv1uUdpEntityT            udp;
diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h b/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h
index 7c8efab478..7ba8a29348 100644
--- a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h
+++ b/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h
@@ -120,11 +120,11 @@ typedef enum {
  * Gtpv2 Stack API information elements definitions
  *--------------------------------------------------------------------------*/
 
-typedef NwU32T  NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */
+typedef NwPtrT  NwGtpv1uStackSessionHandleT;/**< Gtpv2 Stack session Handle */
 typedef NwU8T   NwGtpv1uMsgTypeT;           /**< Gtpv2 Msg Type     */
-typedef NwU32T  NwGtpv1uTrxnHandleT;        /**< Gtpv2 Transaction Handle */
-typedef NwU32T  NwGtpv1uUlpTrxnHandleT;     /**< Gtpv2 Ulp Transaction Handle */
-typedef NwU32T  NwGtpv1uUlpSessionHandleT;  /**< Gtpv2 Ulp session Handle */
+typedef NwPtrT  NwGtpv1uTrxnHandleT;        /**< Gtpv2 Transaction Handle */
+typedef NwPtrT  NwGtpv1uUlpTrxnHandleT;     /**< Gtpv2 Ulp Transaction Handle */
+typedef NwPtrT  NwGtpv1uUlpSessionHandleT;  /**< Gtpv2 Ulp session Handle */
 
 /**
  * API information elements between ULP and Stack for
diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
index 54b1dc23f8..6eafb1269f 100644
--- a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
+++ b/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c
@@ -379,12 +379,12 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN  NwGtpv1uStackT *thiz,
       pTunnelEndPoint = RB_FIND(NwGtpv1uTunnelEndPointIdentifierMap,
                                 &(thiz->teidMap), pTunnelEndPoint);
       NW_ASSERT(pTunnelEndPoint);
-      GTPU_DEBUG("Tunnel end-point 0x%x creation successful for teid 0x%x %u(dec)",
-                 (unsigned int)pTunnelEndPoint, teid, teid);
+      GTPU_DEBUG("Tunnel end-point 0x%p creation successful for teid 0x%x %u(dec)",
+                 pTunnelEndPoint, (unsigned int)teid, (unsigned int)teid);
     }
 
   } else {
-    *phStackSession = (NwGtpv1uStackSessionHandleT) 0;
+    *phStackSession = (NwGtpv1uStackSessionHandleT) NULL;
     rc = NW_GTPV1U_FAILURE;
   }
 
@@ -687,9 +687,9 @@ nwGtpv1uInitialize( NW_INOUT NwGtpv1uStackHandleT *hGtpuStackHandle, NwU32T stac
   memset(thiz, 0, sizeof(NwGtpv1uStackT));
 
   if(thiz) {
-	thiz->id    = (NwU32T) thiz;
-	thiz->stackType = (NwU32T) stackType;
-    thiz->seq   = (NwU16T) ((NwU32T)thiz) ;
+        thiz->id    = (NwPtrT)thiz;
+        thiz->stackType = stackType;
+    thiz->seq   = (NwU16T) ((NwU32T)thiz) ; // FIXME interesting casts... don't know what this is good for...
     RB_INIT(&(thiz->outstandingTxSeqNumMap));
     RB_INIT(&(thiz->outstandingRxSeqNumMap));
     RB_INIT(&(thiz->sessionMap));
@@ -982,8 +982,8 @@ nwGtpv1uProcessTimeout(void *timeoutInfo)
 #if defined(LOG_GTPU) && LOG_GTPU > 0
   NW_ENTER(thiz);
 #endif
-  GTPU_DEBUG("Received timeout event from ULP with timeoutInfo %x!\n",
-             (unsigned int)timeoutInfo);
+  GTPU_DEBUG("Received timeout event from ULP with timeoutInfo 0x%p!\n",
+             timeoutInfo);
 
   rc = (((NwGtpv1uTimeoutInfoT *) timeoutInfo)->timeoutCallbackFunc) (timeoutInfo);
 
-- 
GitLab