Fix OneDefinitionRule Asan violation in tests and osmo-hnbgw

With new gcc 10.1.0, tests failed at runtime when built with ASAN
enabled, since some global variables where defined multiple times.
See OS#4556 for a sample Asan error.

Fixes: OS#4556
Change-Id: I12a667ea8a9f16404c13c9218b246d2e3acfe3e8
diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c
index efa2241..a6df186 100644
--- a/src/tests/test-ranap.c
+++ b/src/tests/test-ranap.c
@@ -34,8 +34,6 @@
 
 #include <osmocom/iuh/hnbgw.h>
 
-int asn1_xer_print = 1;
-
 extern void *tall_msgb_ctx;
 
 static void test_aper_int(uint32_t inp)
@@ -95,6 +93,8 @@
 	uint8_t ck[16] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
 	int i;
 
+	asn1_xer_print = 1;
+
 	//asn_debug = 1;
 
 	test_common_init();