Move message definition to c file sandbox/vbarinov/asan
authorSlava Barinov <v.barinov@samsung.com>
Tue, 24 May 2016 07:48:12 +0000 (10:48 +0300)
committerSlava Barinov <v.barinov@samsung.com>
Tue, 24 May 2016 07:48:12 +0000 (10:48 +0300)
The change fixes build with -fno-common and enables Address Sanitizer.

Change-Id: Ide7441f61fead0f231ca2165b8236ab943baebff
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
src/delta.c
src/delta.h

index a462766c94abc2fe3bb542a477f67c4a1e50ee27..f222b65caf857b28c7b5d6968a12d7cf24210a0e 100644 (file)
@@ -33,6 +33,7 @@ static GList *__list_directory(const char *dir_name, const char *tpk_path, GList
 static int __compare_files(char *path1, char *path2);
 static void __print_to_file(char *msg);
 static void __free_g_list(GList *list);
+char message[MAX_MESSAGE_LEN];
 
 static void __free_g_list(GList *list)
 {
index 4d1d171c80f6aa9a08ef6aa2bf679460a4c86f6f..56bed12ee94bc9edfcdae3e7681af3642b1d03df 100644 (file)
@@ -25,7 +25,7 @@
 #define UNZIPFILE              "_FILES"
 #define MAX_MESSAGE_LEN        1024
 #define BUF_SIZE       1024
-char message[MAX_MESSAGE_LEN];
+extern char message[MAX_MESSAGE_LEN];
 
 void __create_diff_file(char *old_tpk_path, char *new_tpk_path);
 int __xsystem(const char *argv[]);