From 4804d74c616074f62f078afe87a745e26eb9f453 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 7 Nov 2018 11:37:00 -0600 Subject: [PATCH] apps/system/system.c: Fix warning when passing argument 6 of 'task_spawn' from incompatible pointer type [-Wincompatible-pointer-types] --- system/system/system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/system/system.c b/system/system/system.c index 07771f3b2..f96a931f5 100644 --- a/system/system/system.c +++ b/system/system/system.c @@ -74,7 +74,7 @@ int system(FAR const char *cmd) { - FAR const char *argv[2]; + FAR char *argv[2]; struct sched_param param; posix_spawnattr_t attr; pid_t pid; @@ -141,7 +141,7 @@ int system(FAR const char *cmd) /* Spawn nsh_system() which will execute the command under the shell. */ - argv[0] = cmd; + argv[0] = (FAR char *)cmd; argv[1] = NULL; #ifdef CONFIG_BUILD_LOADABLE