From b5a03474bf82f40c70adeffe1c63d28017440078 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Fri, 24 Mar 2017 16:46:42 +0100
Subject: [PATCH] remove asn1 compilation fixes that went to asn1c (IMPORTANT:
 reinstall asn1c!)

The files NativeInteger.c.diff and constr_SET_OF.c.diff
from asn1c were generating compilation warnings. We had
local patches applied on generated files by asn1c.

A new version of asn1c has been pushed to
https://gitlab.eurecom.fr/oai/asn1c
(commit 224dc1f991b7e7ad705ce92e171b942f87b7b7e7)
making obsolete the fixes we do here.

So we now remove those fixes.

*************************
* IMPORTANT BEGIN       *
*************************

Everyone should update their asn1c installation.

The simplest is to do:

    source oaienv
    cd cmake_targets
    ./build_oai -I

*************************
* IMPORTANT END         *
*************************
---
 cmake_targets/tools/fix_asn1                           | 10 +---------
 .../fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff    |  8 --------
 .../fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff    |  4 ----
 .../fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff    |  8 --------
 .../fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff    |  4 ----
 5 files changed, 1 insertion(+), 33 deletions(-)
 delete mode 100644 cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff
 delete mode 100644 cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff
 delete mode 100644 cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff
 delete mode 100644 cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff

diff --git a/cmake_targets/tools/fix_asn1 b/cmake_targets/tools/fix_asn1
index 0661d7878de..6d55e1e9bc7 100755
--- a/cmake_targets/tools/fix_asn1
+++ b/cmake_targets/tools/fix_asn1
@@ -9,13 +9,6 @@ RRC_Rel10=(
 
 X2AP_Rel11_2=(
   "X2ap-CriticalityDiagnostics-IE-List.h" ae96308b37fcbcbf39da5012e42968135fc5f27b "fix_asn1.data/X2AP.rel11.2/X2ap-CriticalityDiagnostics-IE-List.h.diff"
-  "NativeInteger.c"                       1a55f5402fd363318cf5444ffe1f67530dcf66ff "fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff"
-  "constr_SET_OF.c"                       808cbbdf19b118c0bdb04e3acf2cbe6e4133be2b "fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff"
-)
-
-S1AP_Rel10_5=(
-  "NativeInteger.c" 1a55f5402fd363318cf5444ffe1f67530dcf66ff "fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff"
-  "constr_SET_OF.c" 808cbbdf19b118c0bdb04e3acf2cbe6e4133be2b "fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff"
 )
 
 red_color="$(tput setaf 1)"
@@ -130,8 +123,7 @@ function patch_s1ap()
 
   case "$version" in
     R10 )
-      echo "patching S1AP files release 10.5"
-      apply_patches "$directory" S1AP_Rel10_5 ${#S1AP_Rel10_5[*]}
+      #nothing to do anymore (fixes went to asn1c)
       ;;
     * )
       error unknwon/unhandled S1AP version \'"$version"\'
diff --git a/cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff b/cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff
deleted file mode 100644
index 3b51426ad3f..00000000000
--- a/cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/NativeInteger.c.diff
+++ /dev/null
@@ -1,8 +0,0 @@
-283c283
-< 	int dynamic = 0;
----
-> 	//int dynamic = 0;
-290c290
-< 		dynamic = 1;
----
-> 		//dynamic = 1;
diff --git a/cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff b/cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff
deleted file mode 100644
index 3ceaf5e3e5c..00000000000
--- a/cmake_targets/tools/fix_asn1.data/S1AP.rel10.5/constr_SET_OF.c.diff
+++ /dev/null
@@ -1,4 +0,0 @@
-1007c1007
-< 				(int)nelems, (int)ct ? ct->effective_bits : -1);
----
-> 				(int)nelems, ct ? ct->effective_bits : -1);
diff --git a/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff b/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff
deleted file mode 100644
index 3b51426ad3f..00000000000
--- a/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/NativeInteger.c.diff
+++ /dev/null
@@ -1,8 +0,0 @@
-283c283
-< 	int dynamic = 0;
----
-> 	//int dynamic = 0;
-290c290
-< 		dynamic = 1;
----
-> 		//dynamic = 1;
diff --git a/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff b/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff
deleted file mode 100644
index 3ceaf5e3e5c..00000000000
--- a/cmake_targets/tools/fix_asn1.data/X2AP.rel11.2/constr_SET_OF.c.diff
+++ /dev/null
@@ -1,4 +0,0 @@
-1007c1007
-< 				(int)nelems, (int)ct ? ct->effective_bits : -1);
----
-> 				(int)nelems, ct ? ct->effective_bits : -1);
-- 
GitLab