tests/elm: make argv a static char so it never goes out of scope and crashes
authorMike Blumenkrantz <zmike@samsung.com>
Mon, 21 Oct 2019 19:51:28 +0000 (15:51 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 11 Nov 2019 02:20:39 +0000 (11:20 +0900)
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10511

src/tests/elementary/suite_helpers.c

index 9753d25..0840f13 100644 (file)
@@ -24,17 +24,16 @@ Eina_Bool abort_on_warnings = EINA_FALSE;
 
 void elm_test_init(TCase *tc);
 
+static char *args[] = { "exe" };
+
 SUITE_INIT(elm)
 {
-   char *args[] = { "exe" };
    ck_assert_int_eq(elm_init(1, args), 1);
 }
 
 void
 _elm2_suite_init(void)
 {
-   char *args[] = { "exe" };
-
    if (getpid() != main_pid)
      {
         if (abort_on_warnings)