From 4dbc0a27c645f6ad3e4879eb78701baa811dce0a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 26 Feb 2017 18:15:16 -0600 Subject: [PATCH] pthread_create: g_pthreadname[] is not used if CONFIG_TASK_NAME_SIZE==0. --- sched/pthread/pthread_create.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 7a4e628e00d..957936cd826 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/pthread/pthread_create.c * - * Copyright (C) 2007-2009, 2011, 2013-2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011, 2013-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,11 @@ const pthread_attr_t g_default_pthread_attr = PTHREAD_ATTR_INITIALIZER; * Private Data ****************************************************************************/ +#if CONFIG_TASK_NAME_SIZE > 0 /* This is the name for name-less pthreads */ static const char g_pthreadname[] = ""; +#endif /**************************************************************************** * Private Functions