Skip to content

Conversation

@xuelix
Copy link
Member

@xuelix xuelix commented Jul 29, 2022

Fixing MISRA violation 17.7, 1.2 and 8.9
Description

Test Steps

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@xuelix xuelix requested a review from a team as a code owner July 29, 2022 01:24
Copy link
Member

@AniruddhaKanhere AniruddhaKanhere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @xuelix.
I have a couple of comments. Can you please take a look?

prvGetCacheIPEntry( uxIndex,
pulIP,
ulCurrentTimeSeconds );
( void ) prvGetCacheIPEntry( uxIndex,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a comment about why the result is being discarded here and why is it safe to do so.
Something along the lines of:

/* This statement can only be reached when xResult is true; which
 * implies that the entry is present and a 'get' operation will result
 * in success. Therefore, it is safe to ignore the return value of the
 * below function. */

Copy link
Member Author

@xuelix xuelix Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have too many (void) in front of functions (e.g. hundreds of them including memcpy) . I don't think we need to add for one specific function calls.

@xuelix xuelix requested a review from AniruddhaKanhere August 1, 2022 21:41
@AniruddhaKanhere AniruddhaKanhere merged commit f8c7271 into FreeRTOS:main Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants