Mksys Error(array subscript has type ‘char')

How to fixed this error??

exars@exars-IStNX3-15HP038:~/workspace/legatoAF/legato-19.11.2/apps/sample/NAD$ mkapp -t wp76xx main.adef
[1/8] Compiling C source
FAILED: /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/obj/e3623f37f07efc338fc2ec0666611165.o
/opt/swi/SWI9X07Y_02.37.10.00/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/SWI9X07Y_02.37.10.00/sysroots/armv7a-neon-poky-linux-gnueabi -MMD -MF /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/obj/e3623f37f07efc338fc2ec0666611165.o.d -Wall -Werror -fvisibility=hidden -c /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c -o /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/obj/e3623f37f07efc338fc2ec0666611165.o -DLE_FILENAME=basename /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c -DMK_TOOLS_BUILD -DLEGATO_EMBEDDED -fPIC -I /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx -I/home/exars/workspace/legatoAF/legato-19.11.2/interfaces -I/home/exars/workspace/legatoAF/legato-19.11.2/framework/include -I/home/exars/workspace/legatoAF/legato-19.11.2/build/wp76xx/framework/include -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/src -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/79f9ee897fe2469d6c6df929946f102c -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/79f9ee897fe2469d6c6df929946f102c/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/1e3fdfd1a762ad7034b830d463b98c64 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/1e3fdfd1a762ad7034b830d463b98c64/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/79f9ee897fe2469d6c6df929946f102c/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/1e3fdfd1a762ad7034b830d463b98c64/client -DLE_COMPONENT_NAME=NADComponent -DLE_LOG_SESSION=NADComponent_LogSession -DLE_LOG_LEVEL_FILTER_PTR=NADComponent_LogLevelFilterPtr “-std=c99”
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c: In function ‘http_client’:
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:180:25: error: array subscript has type ‘char’ [-Werror=char-subscripts]
while(step < pstpath[execnum]->cnt)
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:190:5: error: implicit declaration of function ‘bzero’ [-Werror=implicit-function-declaration]
bzero(&server, sizeof(server)); /* 構造体をゼロクリア */
^~~~~
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:195:5: error: implicit declaration of function ‘bcopy’ [-Werror=implicit-function-declaration]
bcopy(servhost->h_addr, &server.sin_addr, servhost->h_length);
^~~~~
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:195:19: error: ‘struct hostent’ has no member named ‘h_addr’
bcopy(servhost->h_addr, &server.sin_addr, servhost->h_length);
^~
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:220:21: error: array subscript has type ‘char’ [-Werror=char-subscripts]
strcat(path,pstpath[execnum]->ppathc[step]);
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:220:38: error: array subscript has type ‘char’ [-Werror=char-subscripts]
strcat(path,pstpath[execnum]->ppathc[step]);
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:250:30: error: array subscript has type ‘char’ [-Werror=char-subscripts]
if (( (step + 1) == pstpath[execnum]->cnt ) && /* 最後のコマンドのRESULTを受信 */
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:265:52: error: array subscript has type ‘char’ [-Werror=char-subscripts]
if (( execnum == CMD_IMG_DL ) && ( step == pstpath[execnum]->cnt )) {
^
cc1: all warnings being treated as errors
[2/8] Compiling C source

You can try this:

mkapp main.adef.adef -t wp76xx -C -Wno-error=char-subscripts -Wno-error=implicit-function-declaration

got this:

exars@exars-IStNX3-15HP038:~/workspace/legatoAF/legato-19.11.2/apps/sample/NAD$ mkapp main.adef.adef -t wp76xx -C -Wno-error=char-subscripts -Wno-error=implicit-function-declaration
** ERROR:
Bad short parameter name, -Wno-error=implicit-function-declaration.

try this


mkapp main.adef.adef -t wp76xx -C -Wno-error=char-subscripts -C -Wno-error=implicit-function-declaration

got this:

exars@exars-IStNX3-15HP038:~/workspace/legatoAF/legato-19.11.2/apps/sample/NAD$ mkapp main.adef -t wp76xx -C -Wno-error=char-subscripts -C -Wno-error=implicit-function-declaration
[15/26] Compiling C source
FAILED: /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/obj/e3623f37f07efc338fc2ec0666611165.o
/opt/swi/SWI9X07Y_02.37.10.00/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/SWI9X07Y_02.37.10.00/sysroots/armv7a-neon-poky-linux-gnueabi -MMD -MF /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/obj/e3623f37f07efc338fc2ec0666611165.o.d -Wall -Werror -fvisibility=hidden -c /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c -o /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/obj/e3623f37f07efc338fc2ec0666611165.o -DLE_FILENAME=basename /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c -DMK_TOOLS_BUILD -DLEGATO_EMBEDDED -fPIC -Wno-error=char-subscripts -Wno-error=implicit-function-declaration -I /home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx -I/home/exars/workspace/legatoAF/legato-19.11.2/interfaces -I/home/exars/workspace/legatoAF/legato-19.11.2/framework/include -I/home/exars/workspace/legatoAF/legato-19.11.2/build/wp76xx/framework/include -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/component/aac4d10907cdd093751261856d881cdb/src -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c5ce5daff263b081f6f4bf783d1d5765/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/fc135b648a819aa2f9f2907732b37940/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/c2cf72a6652c81d1da62ad0d1e400005/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/3b59e8a42f53ddfed95a8a16f6050d2a/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/b1bbe9d878a6b8d1a43c76da6425e065/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/9df1b1413325aa24263c6079d07b72db/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/04c50e63b89f93a96416daa1d43af472/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/79f9ee897fe2469d6c6df929946f102c -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/79f9ee897fe2469d6c6df929946f102c/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/1e3fdfd1a762ad7034b830d463b98c64 -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/1e3fdfd1a762ad7034b830d463b98c64/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/79f9ee897fe2469d6c6df929946f102c/client -I/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/_build_main/wp76xx/api/1e3fdfd1a762ad7034b830d463b98c64/client -DLE_COMPONENT_NAME=NADComponent -DLE_LOG_SESSION=NADComponent_LogSession -DLE_LOG_LEVEL_FILTER_PTR=NADComponent_LogLevelFilterPtr “-std=c99”
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c: In function ‘http_client’:
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:180:25: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while(step < pstpath[execnum]->cnt)
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:190:5: warning: implicit declaration of function ‘bzero’ [-Wimplicit-function-declaration]
bzero(&server, sizeof(server)); /* 構造体をゼロクリア */
^~~~~
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:195:5: warning: implicit declaration of function ‘bcopy’ [-Wimplicit-function-declaration]
bcopy(servhost->h_addr, &server.sin_addr, servhost->h_length);
^~~~~
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:195:19: error: ‘struct hostent’ has no member named ‘h_addr’
bcopy(servhost->h_addr, &server.sin_addr, servhost->h_length);
^~
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:220:21: warning: array subscript has type ‘char’ [-Wchar-subscripts]
strcat(path,pstpath[execnum]->ppathc[step]);
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:220:38: warning: array subscript has type ‘char’ [-Wchar-subscripts]
strcat(path,pstpath[execnum]->ppathc[step]);
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:250:30: warning: array subscript has type ‘char’ [-Wchar-subscripts]
if (( (step + 1) == pstpath[execnum]->cnt ) && /* 最後のコマンドのRESULTを受信 */
^
/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:265:52: warning: array subscript has type ‘char’ [-Wchar-subscripts]
if (( execnum == CMD_IMG_DL ) && ( step == pstpath[execnum]->cnt )) {
^
[20/26] Compiling C source
ninja: build stopped: subcommand failed.

I think you need to do some debugging instead of post all the error message here:

/home/exars/workspace/legatoAF/legato-19.11.2/apps/sample/NAD/NADComponent/http-client_curl.c:195:19: error: ‘struct hostent’ has no member named ‘h_addr’
bcopy(servhost->h_addr, &server.sin_addr, servhost->h_length);