update -Wall -Werror

This commit is contained in:
pvvx 2017-09-07 02:26:00 +03:00
parent 2c29a376ba
commit 7cb9553f73
102 changed files with 3686 additions and 3504 deletions

View file

@ -74,7 +74,7 @@ static int inHandlerMode (void)
#if configSignalManagementSupport // the older FreeRTOS version didn't support Signal Management functions
static void add_thread_signal_map (osThreadId thread_id, EventGroupHandle_t signals)
{
int dummy;
int dummy = 0;
// uint32_t i;
ThreadSignalRec *prec_entity;
@ -135,7 +135,7 @@ static EventGroupHandle_t find_signal_by_thread (osThreadId thread_id)
{
EventGroupHandle_t signals_hdl=NULL;
// uint32_t i;
int dummy;
int dummy = 0;
ThreadSignalRec *prec_entity;
if (inHandlerMode()) {
@ -185,7 +185,7 @@ static EventGroupHandle_t remove_thread_signal_map (osThreadId thread_id)
{
EventGroupHandle_t signals_hdl=NULL;
// uint32_t i;
int dummy;
int dummy = 0;
ThreadSignalRec *prec_entity;
ThreadSignalRec *pprev_entity;
@ -989,7 +989,7 @@ osPoolId osPoolCreate (const osPoolDef_t *pool_def)
/// \note MUST REMAIN UNCHANGED: \b osPoolAlloc shall be consistent in every CMSIS-RTOS.
void *osPoolAlloc (osPoolId pool_id)
{
int dummy;
int dummy = 0;
void *p = NULL;
uint32_t i;
uint32_t index;
@ -1047,7 +1047,7 @@ void *osPoolCAlloc (osPoolId pool_id)
/// \note MUST REMAIN UNCHANGED: \b osPoolFree shall be consistent in every CMSIS-RTOS.
osStatus osPoolFree (osPoolId pool_id, void *block)
{
int dummy;
int dummy = 0;
uint32_t index;
if (pool_id == NULL) {

View file

@ -58,6 +58,7 @@ int freertos_ready_to_sleep() {
return wakelock == 0;
}
extern uint32_t osKernelSysTick (void);
/*
* It is called when freertos is going to sleep.
* At this moment, all sleep conditons are satisfied. All freertos' sleep pre-processing are done.
@ -65,7 +66,7 @@ int freertos_ready_to_sleep() {
* @param expected_idle_time : The time that FreeRTOS expect to sleep.
* If we set this value to 0 then FreeRTOS will do nothing in its sleep function.
**/
void freertos_pre_sleep_processing(unsigned int *expected_idle_time) {
void freertos_pre_sleep_processing(uint32_t *expected_idle_time) {
#ifdef CONFIG_SOC_PS_MODULE
@ -176,7 +177,7 @@ void freertos_pre_sleep_processing(unsigned int *expected_idle_time) {
#endif
}
void freertos_post_sleep_processing(unsigned int *expected_idle_time) {
void freertos_post_sleep_processing(uint32_t *expected_idle_time) {
#ifndef configSYSTICK_CLOCK_HZ
*expected_idle_time = 1 + ( portNVIC_SYSTICK_CURRENT_VALUE_REG / ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) );
#else
@ -257,8 +258,12 @@ uint32_t get_wakelock_status() {
}
#if (configGENERATE_RUN_TIME_STATS == 1)
extern int sprintf(char* str, const char* fmt, ...);
extern size_t strlen(const char *str);
void get_wakelock_hold_stats( char *pcWriteBuffer ) {
u32 i;
int i;
u32 current_timestamp = osKernelSysTick();
*pcWriteBuffer = 0x00;
@ -269,15 +274,15 @@ void get_wakelock_hold_stats( char *pcWriteBuffer ) {
for (i=0; i<32; i++) {
if (last_wakelock_state[i] == 1) {
sprintf(pcWriteBuffer, "%x\t\t%d\r\n", i, hold_wakelock_time[i] + (current_timestamp - last_acquire_wakelock_time[i]));
sprintf(pcWriteBuffer, "%x\t\t%u\r\n", i, (unsigned int)( hold_wakelock_time[i] + (current_timestamp - last_acquire_wakelock_time[i])));
} else {
if (hold_wakelock_time[i] > 0) {
sprintf(pcWriteBuffer, "%x\t\t%d\r\n", i, hold_wakelock_time[i]);
sprintf(pcWriteBuffer, "%x\t\t%u\r\n", i, (unsigned int)hold_wakelock_time[i]);
}
}
pcWriteBuffer += strlen( pcWriteBuffer );
}
sprintf(pcWriteBuffer, "time passed: %d ms, system sleep %d ms\r\n", current_timestamp - base_sys_time, sys_sleep_time);
sprintf(pcWriteBuffer, "time passed: %u ms, system sleep %u ms\r\n", (unsigned int)(current_timestamp - base_sys_time), (unsigned int)sys_sleep_time);
}
void clean_wakelock_stat() {

View file

@ -174,7 +174,7 @@ void cli(void);
#endif
#define HALT() do { cli(); for(;;);} while(0)
//#undef ASSERT
#undef ASSERT
#define ASSERT(x) do { \
if((x) == 0) \
printf("\n\rAssert(" #x ") failed on line %d in file %s", __LINE__, __FILE__); \

View file

@ -162,7 +162,7 @@ typedef struct HeapRegion
* terminated by a HeapRegions_t structure that has a size of 0. The region
* with the lowest start address must appear first in the array.
*/
static void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;
//static void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;
/*

View file

@ -689,6 +689,7 @@ __attribute__(( weak )) void vPortSetupTimerInterrupt( void )
#endif /* configASSERT_DEFINED */
/*-----------------------------------------------------------*/
#if configUSE_IDLE_HOOK
extern void WDGRefresh(void);
void vApplicationIdleHook( void )
{
/* Use the idle task to place the CPU into a low power mode. Greater power

View file

@ -202,6 +202,7 @@ HeapRegion_t xHeapRegions[] =
#endif
#endif
static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions);
/*-----------------------------------------------------------*/
/*
Dump xBlock list
@ -501,7 +502,7 @@ static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) {
uint8 chip_id = HalGetChipId();
while (pxHeapRegion->xSizeInBytes > 0) {
if (pxHeapRegion->pucStartAddress
if ((uint32_t)pxHeapRegion->pucStartAddress
> 0x20000000 && chip_id >= CHIP_ID_8711AN && chip_id <= CHIP_ID_8711AF) {
// pxHeapRegion->pucStartAddress = 0;
// pxHeapRegion->xSizeInBytes = 0;
@ -584,6 +585,8 @@ static void vPortDefineHeapRegions(const HeapRegion_t * const pxHeapRegions) {
}
extern void * rtl_memcpy(void *dst0, const void *src0, size_t len0);
void* pvPortReAlloc(void *pv, size_t xWantedSize) {
BlockLink_t *pxLink;

View file

@ -82,6 +82,7 @@ task.h is included from an application file. */
#include "task.h"
#include "timers.h"
#include "StackMacros.h"
#include "tcm_heap.h"
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the
MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined for the