From 5ce1f136598b411b9f469790690890223d5996ce Mon Sep 17 00:00:00 2001 From: richardbarry Date: Wed, 5 Jun 2013 15:25:26 +0000 Subject: [PATCH] Remove compiler warnings from the trace recorder code. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1907 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../Source/FreeRTOS-Plus-Trace/{ => Include}/trcKernelPort.h | 4 ++-- FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernel.c | 4 ++-- FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcUser.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/{ => Include}/trcKernelPort.h (97%) diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h similarity index 97% rename from FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.h rename to FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h index 25de1e74f..009c3c9e4 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h @@ -99,7 +99,7 @@ /* Includes */ #include "trcTypes.h" #include "trcConfig.h" -#include "trcKernelHooks.h" +#include "trcHooks.h" #include "trcHardwarePort.h" #include "trcBase.h" #include "trcKernel.h" @@ -374,7 +374,7 @@ void* prvTraceGetCurrentTaskHandle(void); /* Called on each OS tick. Will call uiPortGetTimestamp to make sure it is called at least once every OS tick. */ #undef traceTASK_INCREMENT_TICK #define traceTASK_INCREMENT_TICK( xTickCount ) \ - if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdTRUE || uxMissedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \ + if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdTRUE || uxPendedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \ if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdFALSE) { trcKERNEL_HOOKS_NEW_TIME(DIV_NEW_TIME, xTickCount + 1); } /* Called on each task-switch */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernel.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernel.c index ce9b14a84..b18e2d840 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernel.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernel.c @@ -136,7 +136,7 @@ void vTraceStoreKernelCall(uint32_t ecode, traceObjectClass objectClass, uint32_ if (nISRactive || !inExcludedTask) { /* Check if the referenced object or the event code is excluded */ - if (!uiTraceIsObjectExcluded(objectClass, objectNumber) && !TRACE_GET_EVENT_CODE_FLAG_ISEXCLUDED(ecode)) + if (!uiTraceIsObjectExcluded(objectClass, (objectHandleType)objectNumber) && !TRACE_GET_EVENT_CODE_FLAG_ISEXCLUDED(ecode)) { trcCRITICAL_SECTION_BEGIN(); dts1 = (uint16_t)prvTraceGetDTS(0xFFFF); @@ -193,7 +193,7 @@ void vTraceStoreKernelCallWithParam(uint32_t evtcode, } /* Check if the referenced object or the event code is excluded */ - if (!uiTraceIsObjectExcluded(objectClass, objectNumber) && !TRACE_GET_EVENT_CODE_FLAG_ISEXCLUDED(evtcode)) + if (!uiTraceIsObjectExcluded(objectClass, (objectHandleType)objectNumber) && !TRACE_GET_EVENT_CODE_FLAG_ISEXCLUDED(evtcode)) { trcCRITICAL_SECTION_BEGIN(); dts2 = (uint8_t)prvTraceGetDTS(0xFF); diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcUser.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcUser.c index 3f33cc004..114ac1ec7 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcUser.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcUser.c @@ -1101,7 +1101,7 @@ void vTracePrintF_Helper(traceLabel eventLabel, const char* formatStr, va_list v events that would be partially overwritten. If so, they must be "killed" by replacing the user event and following data with NULL events (i.e., using a memset to zero).*/ - prvCheckDataToBeOverwrittenForMultiEntryEvents(noOfSlots); + prvCheckDataToBeOverwrittenForMultiEntryEvents((uint8_t)noOfSlots); #endif /* Copy the local buffer to the main buffer */ (void)memcpy(& RecorderDataPtr->eventData[RecorderDataPtr->nextFreeIndex * 4], @@ -1112,7 +1112,7 @@ void vTracePrintF_Helper(traceLabel eventLabel, const char* formatStr, va_list v main USER_EVENT entry (Note: important that this is after the memcpy, but within the critical section!)*/ RecorderDataPtr->eventData[RecorderDataPtr->nextFreeIndex * 4] = - (uint8_t) USER_EVENT + noOfSlots - 1; + (uint8_t) ( USER_EVENT + noOfSlots - 1 ); /* Update the main buffer event index (already checked that it fits in the buffer, so no need to check for wrapping)*/ -- 2.39.5