From b763a2a396e1ac0c4989ebbb462df519767ed3ce Mon Sep 17 00:00:00 2001 From: Matthieu Volat Date: Tue, 23 May 2017 19:19:05 +0200 Subject: [PATCH] Handle some litteral string -> char* casts. It's 100% legit in C, but icc seems to process it like C++, and since simgrid is being ported to C++, well... --- src/xbt/xbt_os_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xbt/xbt_os_thread.c b/src/xbt/xbt_os_thread.c index 7bd87a6ac7..613869ac81 100644 --- a/src/xbt/xbt_os_thread.c +++ b/src/xbt/xbt_os_thread.c @@ -96,7 +96,7 @@ void xbt_os_thread_mod_preinit(void) main_thread = xbt_new(s_xbt_os_thread_t, 1); main_thread->name = NULL; main_thread->detached = 0; - main_thread->name = (char *) "main"; + main_thread->name = xbt_strdup("main"); main_thread->param = NULL; main_thread->start_routine = NULL; main_thread->extra_data = NULL; @@ -234,7 +234,7 @@ void xbt_os_thread_setguardsize(int guard_size) const char *xbt_os_thread_self_name(void) { xbt_os_thread_t me = xbt_os_thread_self(); - return me ? me->name : "main"; + return me ? (const char *)me->name : "main"; } void xbt_os_thread_join(xbt_os_thread_t thread, void **thread_return) -- 2.20.1