Skip to content

Commit 7f43327

Browse files
committed
remove lint comments
1 parent 5fb6a4f commit 7f43327

File tree

7 files changed

+50
-58
lines changed

7 files changed

+50
-58
lines changed

src/event_groups.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ task.h is included from an application file. */
3939
#include "timers.h"
4040
#include "event_groups.h"
4141

42-
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the
43-
MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined for the
44-
header files above, but not in this file, in order to generate the correct
45-
privileged Vs unprivileged linkage and placement. */
4642
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
4743

4844
/* The following bit fields convey control information in a task's event list
@@ -531,7 +527,7 @@ BaseType_t xMatchFound = pdFALSE;
531527
configASSERT( ( uxBitsToSet & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
532528

533529
pxList = &( pxEventBits->xTasksWaitingForBits );
534-
pxListEnd = listGET_END_MARKER( pxList ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */
530+
pxListEnd = listGET_END_MARKER( pxList );
535531
vTaskSuspendAll();
536532
{
537533
traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet );

src/port.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,6 @@ uint16_t usAddress;
423423
*pxTopOfStack = ( StackType_t ) 0x031; /* R31 */
424424
pxTopOfStack--;
425425

426-
/*lint +e950 +e611 +e923 */
427-
428426
return pxTopOfStack;
429427
}
430428
/*-----------------------------------------------------------*/

src/stream_buffer.c

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@ task.h is included from an application file. */
4747
because the MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined
4848
for the header files above, but not in this file, in order to generate the
4949
correct privileged Vs unprivileged linkage and placement. */
50-
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE /*lint !e961 !e750 !e9021. */
50+
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
5151

5252
/* If the user has not provided application specific Rx notification macros,
5353
or #defined the notification macros away, them provide default implementations
5454
that uses task notifications. */
55-
/*lint -save -e9026 Function like macros allowed and needed here so they can be overidden. */
5655
#ifndef sbRECEIVE_COMPLETED
5756
#define sbRECEIVE_COMPLETED( pxStreamBuffer ) \
5857
vTaskSuspendAll(); \
@@ -126,7 +125,6 @@ that uses task notifications. */
126125
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); \
127126
}
128127
#endif /* sbSEND_COMPLETE_FROM_ISR */
129-
/*lint -restore (9026) */
130128

131129
/* The number of bytes used to hold the length of a message in the buffer. */
132130
#define sbBYTES_TO_STORE_MESSAGE_LENGTH ( sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ) )
@@ -138,7 +136,7 @@ that uses task notifications. */
138136
/*-----------------------------------------------------------*/
139137

140138
/* Structure that hold state information on the buffer. */
141-
typedef struct StreamBufferDef_t /*lint !e9058 Style convention uses tag. */
139+
typedef struct StreamBufferDef_t
142140
{
143141
volatile size_t xTail; /* Index to the next item to read within the buffer. */
144142
volatile size_t xHead; /* Index to the next item to write within the buffer. */
@@ -243,7 +241,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
243241
the buffer was empty. */
244242
if( xTriggerLevelBytes == ( size_t ) 0 )
245243
{
246-
xTriggerLevelBytes = ( size_t ) 1; /*lint !e9044 Parameter modified to ensure it doesn't have a dangerous value. */
244+
xTriggerLevelBytes = ( size_t ) 1;
247245
}
248246

249247
/* A stream buffer requires a StreamBuffer_t structure and a buffer.
@@ -255,12 +253,12 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
255253
space would be reported as one byte smaller than would be logically
256254
expected. */
257255
xBufferSizeBytes++;
258-
pucAllocatedMemory = ( uint8_t * ) pvPortMalloc( xBufferSizeBytes + sizeof( StreamBuffer_t ) ); /*lint !e9079 malloc() only returns void*. */
256+
pucAllocatedMemory = ( uint8_t * ) pvPortMalloc( xBufferSizeBytes + sizeof( StreamBuffer_t ) );
259257

260258
if( pucAllocatedMemory != NULL )
261259
{
262-
prvInitialiseNewStreamBuffer( ( StreamBuffer_t * ) pucAllocatedMemory, /* Structure at the start of the allocated memory. */ /*lint !e9087 Safe cast as allocated memory is aligned. */ /*lint !e826 Area is not too small and alignment is guaranteed provided malloc() behaves as expected and returns aligned buffer. */
263-
pucAllocatedMemory + sizeof( StreamBuffer_t ), /* Storage area follows. */ /*lint !e9016 Indexing past structure valid for uint8_t pointer, also storage area has no alignment requirement. */
260+
prvInitialiseNewStreamBuffer( ( StreamBuffer_t * ) pucAllocatedMemory, /* Structure at the start of the allocated memory. */
261+
pucAllocatedMemory + sizeof( StreamBuffer_t ), /* Storage area follows. */
264262
xBufferSizeBytes,
265263
xTriggerLevelBytes,
266264
ucFlags );
@@ -286,7 +284,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
286284
uint8_t * const pucStreamBufferStorageArea,
287285
StaticStreamBuffer_t * const pxStaticStreamBuffer )
288286
{
289-
StreamBuffer_t * const pxStreamBuffer = ( StreamBuffer_t * ) pxStaticStreamBuffer; /*lint !e740 !e9087 Safe cast as StaticStreamBuffer_t is opaque Streambuffer_t. */
287+
StreamBuffer_t * const pxStreamBuffer = ( StreamBuffer_t * ) pxStaticStreamBuffer;
290288
StreamBufferHandle_t xReturn;
291289
uint8_t ucFlags;
292290

@@ -342,7 +340,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
342340

343341
traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer );
344342

345-
xReturn = ( StreamBufferHandle_t ) pxStaticStreamBuffer; /*lint !e9087 Data hiding requires cast to opaque type. */
343+
xReturn = ( StreamBufferHandle_t ) pxStaticStreamBuffer;
346344
}
347345
else
348346
{
@@ -370,7 +368,7 @@ StreamBuffer_t * pxStreamBuffer = xStreamBuffer;
370368
{
371369
/* Both the structure and the buffer were allocated using a single call
372370
to pvPortMalloc(), hence only one call to vPortFree() is required. */
373-
vPortFree( ( void * ) pxStreamBuffer ); /*lint !e9087 Standard free() semantics require void *, plus pxStreamBuffer was allocated by pvPortMalloc(). */
371+
vPortFree( ( void * ) pxStreamBuffer );
374372
}
375373
#else
376374
{
@@ -699,7 +697,7 @@ static size_t prvWriteMessageToBuffer( StreamBuffer_t * const pxStreamBuffer,
699697
if( xShouldWrite != pdFALSE )
700698
{
701699
/* Writes the data itself. */
702-
xReturn = prvWriteBytesToBuffer( pxStreamBuffer, ( const uint8_t * ) pvTxData, xDataLengthBytes ); /*lint !e9079 Storage buffer is implemented as uint8_t for ease of sizing, alighment and access. */
700+
xReturn = prvWriteBytesToBuffer( pxStreamBuffer, ( const uint8_t * ) pvTxData, xDataLengthBytes );
703701
}
704702
else
705703
{
@@ -961,7 +959,7 @@ configMESSAGE_BUFFER_LENGTH_TYPE xTempNextMessageLength;
961959
}
962960

963961
/* Read the actual data. */
964-
xReceivedLength = prvReadBytesFromBuffer( pxStreamBuffer, ( uint8_t * ) pvRxData, xNextMessageLength, xBytesAvailable ); /*lint !e9079 Data storage area is implemented as uint8_t array for ease of sizing, indexing and alignment. */
962+
xReceivedLength = prvReadBytesFromBuffer( pxStreamBuffer, ( uint8_t * ) pvRxData, xNextMessageLength, xBytesAvailable );
965963

966964
return xReceivedLength;
967965
}
@@ -1100,15 +1098,15 @@ size_t xNextHead, xFirstLength;
11001098

11011099
/* Write as many bytes as can be written in the first write. */
11021100
configASSERT( ( xNextHead + xFirstLength ) <= pxStreamBuffer->xLength );
1103-
memcpy( ( void* ) ( &( pxStreamBuffer->pucBuffer[ xNextHead ] ) ), ( const void * ) pucData, xFirstLength ); /*lint !e9087 memcpy() requires void *. */
1101+
memcpy( ( void* ) ( &( pxStreamBuffer->pucBuffer[ xNextHead ] ) ), ( const void * ) pucData, xFirstLength );
11041102

11051103
/* If the number of bytes written was less than the number that could be
11061104
written in the first write... */
11071105
if( xCount > xFirstLength )
11081106
{
11091107
/* ...then write the remaining bytes to the start of the buffer. */
11101108
configASSERT( ( xCount - xFirstLength ) <= pxStreamBuffer->xLength );
1111-
memcpy( ( void * ) pxStreamBuffer->pucBuffer, ( const void * ) &( pucData[ xFirstLength ] ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */
1109+
memcpy( ( void * ) pxStreamBuffer->pucBuffer, ( const void * ) &( pucData[ xFirstLength ] ), xCount - xFirstLength );
11121110
}
11131111
else
11141112
{
@@ -1151,15 +1149,15 @@ size_t xCount, xFirstLength, xNextTail;
11511149
read. Asserts check bounds of read and write. */
11521150
configASSERT( xFirstLength <= xMaxCount );
11531151
configASSERT( ( xNextTail + xFirstLength ) <= pxStreamBuffer->xLength );
1154-
memcpy( ( void * ) pucData, ( const void * ) &( pxStreamBuffer->pucBuffer[ xNextTail ] ), xFirstLength ); /*lint !e9087 memcpy() requires void *. */
1152+
memcpy( ( void * ) pucData, ( const void * ) &( pxStreamBuffer->pucBuffer[ xNextTail ] ), xFirstLength );
11551153

11561154
/* If the total number of wanted bytes is greater than the number
11571155
that could be read in the first read... */
11581156
if( xCount > xFirstLength )
11591157
{
11601158
/*...then read the remaining bytes from the start of the buffer. */
11611159
configASSERT( xCount <= xMaxCount );
1162-
memcpy( ( void * ) &( pucData[ xFirstLength ] ), ( void * ) ( pxStreamBuffer->pucBuffer ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */
1160+
memcpy( ( void * ) &( pucData[ xFirstLength ] ), ( void * ) ( pxStreamBuffer->pucBuffer ), xCount - xFirstLength );
11631161
}
11641162
else
11651163
{
@@ -1225,7 +1223,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
12251223
}
12261224
#endif
12271225

1228-
memset( ( void * ) pxStreamBuffer, 0x00, sizeof( StreamBuffer_t ) ); /*lint !e9087 memset() requires void *. */
1226+
memset( ( void * ) pxStreamBuffer, 0x00, sizeof( StreamBuffer_t ) );
12291227
pxStreamBuffer->pucBuffer = pucBuffer;
12301228
pxStreamBuffer->xLength = xBufferSizeBytes;
12311229
pxStreamBuffer->xTriggerLevelBytes = xTriggerLevelBytes;

src/task.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ typedef struct xMEMORY_REGION
113113
typedef struct xTASK_PARAMETERS
114114
{
115115
TaskFunction_t pvTaskCode;
116-
const char * const pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
116+
const char * const pcName;
117117
configSTACK_DEPTH_TYPE usStackDepth;
118118
void *pvParameters;
119119
UBaseType_t uxPriority;
@@ -129,7 +129,7 @@ in the system. */
129129
typedef struct xTASK_STATUS
130130
{
131131
TaskHandle_t xHandle; /* The handle of the task to which the rest of the information in the structure relates. */
132-
const char *pcTaskName; /* A pointer to the task's name. This value will be invalid if the task was deleted since the structure was populated! */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
132+
const char *pcTaskName; /* A pointer to the task's name. This value will be invalid if the task was deleted since the structure was populated! */
133133
UBaseType_t xTaskNumber; /* A number unique to the task. */
134134
eTaskState eCurrentState; /* The state in which the task existed when the structure was populated. */
135135
UBaseType_t uxCurrentPriority; /* The priority at which the task was running (may be inherited) when the structure was populated. */
@@ -441,7 +441,7 @@ is used in assert() statements. */
441441
void * const pvParameters,
442442
UBaseType_t uxPriority,
443443
StackType_t * const puxStackBuffer,
444-
StaticTask_t * const pxTaskBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
444+
StaticTask_t * const pxTaskBuffer ) PRIVILEGED_FUNCTION;
445445
#endif /* configSUPPORT_STATIC_ALLOCATION */
446446

447447
/**
@@ -1383,7 +1383,7 @@ UBaseType_t uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
13831383
* \defgroup pcTaskGetName pcTaskGetName
13841384
* \ingroup TaskUtils
13851385
*/
1386-
char *pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
1386+
char *pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
13871387

13881388
/**
13891389
* task. h
@@ -1399,7 +1399,7 @@ char *pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION; /*lint !e9
13991399
* \defgroup pcTaskGetHandle pcTaskGetHandle
14001400
* \ingroup TaskUtils
14011401
*/
1402-
TaskHandle_t xTaskGetHandle( const char *pcNameToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
1402+
TaskHandle_t xTaskGetHandle( const char *pcNameToQuery ) PRIVILEGED_FUNCTION;
14031403

14041404
/**
14051405
* task.h
@@ -1632,7 +1632,7 @@ UBaseType_t uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const
16321632
* \defgroup vTaskList vTaskList
16331633
* \ingroup TaskUtils
16341634
*/
1635-
void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
1635+
void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION;
16361636

16371637
/**
16381638
* task. h
@@ -1686,7 +1686,7 @@ void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unquali
16861686
* \defgroup vTaskGetRunTimeStats vTaskGetRunTimeStats
16871687
* \ingroup TaskUtils
16881688
*/
1689-
void vTaskGetRunTimeStats( char *pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
1689+
void vTaskGetRunTimeStats( char *pcWriteBuffer ) PRIVILEGED_FUNCTION;
16901690

16911691
/**
16921692
* task. h

0 commit comments

Comments
 (0)