Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test of cpptest #535

Draft
wants to merge 1 commit into
base: jsarzy/cpptest
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions _user/hello/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@

#include <stdio.h>

int add(int a, int b) {

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-DIR_4_6-b> reported by reviewdog 🐶
The basic numerical type 'int' should not be used

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-DIR_4_6-b> reported by reviewdog 🐶
The basic numerical type 'int' should not be used

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-RULE_8_4-a> reported by reviewdog 🐶
Prototype of function 'add' does not precede function definition

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-RULE_8_7-a> reported by reviewdog 🐶
The function 'add' is referenced only in the translation unit where it is defined

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-DIR_4_6-b> reported by reviewdog 🐶
The basic numerical type 'int' should not be used

int c = a + b;

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-DIR_4_6-b> reported by reviewdog 🐶
The basic numerical type 'int' should not be used

printf("Add: %d\n", c);

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-RULE_21_6-a> reported by reviewdog 🐶
Usage of 'printf' function is not allowed

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-RULE_17_7-a> reported by reviewdog 🐶
Unused function's "printf" return value

return c;
}


int main(void)
{
printf("Hello World!!\n");

add(1, 2);

Choose a reason for hiding this comment

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

⚠️ [cpptestcli] <MISRAC2012-RULE_17_7-a> reported by reviewdog 🐶
Unused function's "add" return value


return 0;
}