From 7c5d1a1547ee60bcf62a799faf4a1073f16b8b83 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 27 Aug 2015 10:08:04 +0200 Subject: [PATCH] Fix warnings --- rpp-test-sw/Makefile.inc | 2 ++ rpp-test-sw/cmdproc/src/cmdproc_freertos.c | 4 ++-- rpp-test-sw/commands/cmd_echoserver.c | 4 ++-- rpp-test-sw/commands/cmd_nc.c | 6 +++--- rpp-test-sw/commands/cmd_sdram.c | 10 +++++----- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/rpp-test-sw/Makefile.inc b/rpp-test-sw/Makefile.inc index 8437080..7a1fe48 100644 --- a/rpp-test-sw/Makefile.inc +++ b/rpp-test-sw/Makefile.inc @@ -19,6 +19,8 @@ OBJS = $(SOURCES:%.c=%.obj) RPP_CFLAGS += -I$(makefile_inc_dir)/cmdproc/include -I$(makefile_inc_dir) RPP_CFLAGS += -I. # For version.h +RPP_LDFLAGS += --heap_size=2048 # Assert requires stdio and it requires heap + rpp-test-sw.out: $(OBJS) $(RPP_LIB_DIR)/rpp-lib.lib $(LD) $(RPP_CFLAGS) $(RPP_LDFLAGS) $(OBJS) $(RPP_LDLIBS) -o $@ diff --git a/rpp-test-sw/cmdproc/src/cmdproc_freertos.c b/rpp-test-sw/cmdproc/src/cmdproc_freertos.c index 84fd6e1..536f007 100644 --- a/rpp-test-sw/cmdproc/src/cmdproc_freertos.c +++ b/rpp-test-sw/cmdproc/src/cmdproc_freertos.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2013 Czech Technical University in Prague + * Copyright (C) 2012-2015 Czech Technical University in Prague * * Created on: 1.8.2012 * @@ -42,7 +42,7 @@ void initCmdProc(unsigned portBASE_TYPE priority) { int taskRetVal; - if ((taskRetVal = xTaskCreate(processCmd, (const signed char *)"processCmd", 1000, NULL, priority, processCmdHandler)) != pdPASS) { + if ((taskRetVal = xTaskCreate(processCmd, "processCmd", 1000, NULL, priority, processCmdHandler)) != pdPASS) { rpp_sci_printf("FreeRTOS: Creating task processCmd failed. Error code: %d", taskRetVal); /* An error occurred, block program */ while (1) diff --git a/rpp-test-sw/commands/cmd_echoserver.c b/rpp-test-sw/commands/cmd_echoserver.c index eadbc39..c86a12e 100644 --- a/rpp-test-sw/commands/cmd_echoserver.c +++ b/rpp-test-sw/commands/cmd_echoserver.c @@ -1,7 +1,7 @@ /* * cmd_echoserver.c -- Simple echoserver * - * Copyright (C) 2014 Czech Technical University in Prague + * Copyright (C) 2014, 2015 Czech Technical University in Prague * * This echoserver is capable of running multiple instances each running * in the background thread. @@ -206,7 +206,7 @@ int cmd_do_init_es(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) { struct netif *netif = rpp_eth_get_netif(INTERFACE_INSTANCE_NUMBER); struct es_thread_context *thread_context; - unsigned char thread_name[5] = "es"; /* thread name, used for debugging only */ + char thread_name[5] = "es"; /* thread name, used for debugging only */ err_t err = ERR_OK; uint8_t pindex; int thread_nr; diff --git a/rpp-test-sw/commands/cmd_nc.c b/rpp-test-sw/commands/cmd_nc.c index 3ecaffd..0ca5c97 100644 --- a/rpp-test-sw/commands/cmd_nc.c +++ b/rpp-test-sw/commands/cmd_nc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2013 Czech Technical University in Prague + * Copyright (C) 2012-2013, 2015 Czech Technical University in Prague * * Created on: Aug 9, 2013 * @@ -547,7 +547,7 @@ int cmd_do_init_nc(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) buff_index = 0; /* initialize arguments and thread name */ #if !NO_SYS - uint8_t name[5] = "nc"; + char name[5] = "nc"; name[4] = '\0'; struct nc_arg nc_arg; /* create space for handing args to nc_run() */ nc_arg.thread = FALSE; @@ -665,7 +665,7 @@ int cmd_do_init_nc(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) rpp_sci_printf("STARTING THREAD: %s\r\n", name); taskNameNum++; /* start thread */ - if ((err = xTaskCreate(&run_nc,(const signed char *)name, ncTaskStackSize, &nc_arg, ncTaskPriority, NULL)) == pdPASS) { + if ((err = xTaskCreate(&run_nc, name, ncTaskStackSize, &nc_arg, ncTaskPriority, NULL)) == pdPASS) { /* block on semaphore, till new thread copies arg to own stack */ xSemaphoreTake( nc_arg.args_coppied, portMAX_DELAY ); vSemaphoreDelete(nc_arg.args_coppied); diff --git a/rpp-test-sw/commands/cmd_sdram.c b/rpp-test-sw/commands/cmd_sdram.c index 908639b..d6f4e5f 100644 --- a/rpp-test-sw/commands/cmd_sdram.c +++ b/rpp-test-sw/commands/cmd_sdram.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2013 Czech Technical University in Prague + * Copyright (C) 2012-2013, 2015 Czech Technical University in Prague * * Created on: 28.2.2013 * @@ -119,10 +119,10 @@ void test_sdr() // after the noise task could not be created, forcing to close the just // opened command processor. portBASE_TYPE task_created = xTaskCreate(sdr_test_task, - (const signed char *)"sdr_test_task", - TEST_TASK_STACK, NULL, TEST_TASK_PRIORITY, - &test_task_handle - ); + "sdr_test_task", + TEST_TASK_STACK, NULL, TEST_TASK_PRIORITY, + &test_task_handle + ); if (task_created != pdPASS) { -- 2.39.2