From 8d7dbf5cd80e5800d0726f3fc3b498b2f55e34d1 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Thu, 28 Nov 2013 15:19:22 +0000
Subject: [PATCH] - Fix some compiler warnings

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4543 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair-cn/MME_APP/mme_app_context.c   |  6 +++---
 openair-cn/S6A/s6a_subscription_data.c | 12 +++++++++---
 openair-cn/SCTP/sctp_eNB_defs.h        |  2 +-
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/openair-cn/MME_APP/mme_app_context.c b/openair-cn/MME_APP/mme_app_context.c
index e0faa78ced..fe1d37a600 100644
--- a/openair-cn/MME_APP/mme_app_context.c
+++ b/openair-cn/MME_APP/mme_app_context.c
@@ -246,10 +246,10 @@ void mme_app_dump_ue_contexts(mme_ue_context_t *mme_ue_context)
             MME_APP_DEBUG("    - IMEISV .........: %*s\n", 15,
                           context_p->me_identity.imeisv);
             MME_APP_DEBUG("    - AMBR (bits/s)     ( Downlink |  Uplink  )\n");
-            MME_APP_DEBUG("        Subscribed ...: (%010u|%010u)\n",
+            MME_APP_DEBUG("        Subscribed ...: (%010"PRIu64"|%010"PRIu64")\n",
                           context_p->subscribed_ambr.br_dl,
                           context_p->subscribed_ambr.br_ul);
-            MME_APP_DEBUG("        Allocated ....: (%010u|%010u)\n",
+            MME_APP_DEBUG("        Allocated ....: (%010"PRIu64"|%010"PRIu64")\n",
                           context_p->used_ambr.br_dl, context_p->used_ambr.br_ul);
             MME_APP_DEBUG("    - Known vectors ..: %u\n", context_p->nb_of_vectors);
             STAILQ_FOREACH(vector_p, &context_p->vector_list, entries)
@@ -286,7 +286,7 @@ void mme_app_dump_ue_contexts(mme_ue_context_t *mme_ue_context)
                             ? "TRUE" : "FALSE");
                 MME_APP_DEBUG("        - APN ...........: %s\n", apn_config_p->service_selection);
                 MME_APP_DEBUG("        - AMBR (bits/s) ( Downlink |  Uplink  )\n");
-                MME_APP_DEBUG("                        (%010u|%010u)\n",
+                MME_APP_DEBUG("                        (%010"PRIu64"|%010"PRIu64")\n",
                             apn_config_p->ambr.br_dl, apn_config_p->ambr.br_ul);
                 MME_APP_DEBUG("        - PDN type ......: %s\n",
                             PDN_TYPE_TO_STRING(apn_config_p->pdn_type));
diff --git a/openair-cn/S6A/s6a_subscription_data.c b/openair-cn/S6A/s6a_subscription_data.c
index 5fd0b43d96..8d4dd886f9 100644
--- a/openair-cn/S6A/s6a_subscription_data.c
+++ b/openair-cn/S6A/s6a_subscription_data.c
@@ -48,14 +48,20 @@ int s6a_parse_subscriber_status(struct avp_hdr *hdr_sub_status,
 }
 
 static inline
-int s6a_parse_msisdn(struct avp_hdr *hdr_msisdn, char *msisdn, int *length)
+int s6a_parse_msisdn(struct avp_hdr *hdr_msisdn, char *msisdn, uint8_t *length)
 {
+    int ret;
+
     DevCheck(hdr_msisdn->avp_value->os.len <= MSISDN_LENGTH,
              hdr_msisdn->avp_value->os.len, MSISDN_LENGTH, 0);
+
     if (hdr_msisdn->avp_value->os.len == 0)
         return 0;
-    *length = sprintf(msisdn, "%*s", (int)hdr_msisdn->avp_value->os.len,
-                      hdr_msisdn->avp_value->os.data);
+    ret = sprintf(msisdn, "%*s", (int)hdr_msisdn->avp_value->os.len,
+                  hdr_msisdn->avp_value->os.data);
+
+    *length = ret;
+
     return 0;
 }
 
diff --git a/openair-cn/SCTP/sctp_eNB_defs.h b/openair-cn/SCTP/sctp_eNB_defs.h
index 716aa1ed42..e81b71f9be 100644
--- a/openair-cn/SCTP/sctp_eNB_defs.h
+++ b/openair-cn/SCTP/sctp_eNB_defs.h
@@ -31,7 +31,7 @@ typedef struct {
     /* Unique SCTP association ID (Local to host), used to distinguish
      * associations between MME and eNB.
      */
-    uint32_t assoc_id;
+    int32_t assoc_id;
 
     /* Current remote port used for transmission */
     uint16_t  remote_port;
-- 
GitLab