The packed-attribute on the tcb_info_s type was misplaced, which caused
incompatible memory layout between host and target. According to
current GCC documentation:
> You may specify type attributes in an enum, struct or union type
> declaration or definition by placing them immediately after the struct,
> union or enum keyword. You can also place them just past the closing
> curly brace of the definition, but this is less preferred because
> logically the type should be fully defined at the closing brace.
I also added jlink-nuttx.so to the .gitignore list and updated nxstyle
to ignore the camel case function names required by JLinkGDBServer.
Signed-off-by: Michael Jung <mijung@gmx.net>
When nxstyle.c detects a "\'", it seeks the other "\'", records the index as "endndx", then skip the "'x'". But it makes the index "n" as "endndx+1".Then it comes to the "n++" in "for()". So the character after "'x'" will be skipped, causing some errors.
For example, "{"devid", no_argument, NULL, 'i'},", the "}" will be skipped, causing a lot of error reports.
Now it's fixed.
Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
The nxstyle check tool can't recongnize the style error that --, -> or ++ is not next to the operand. For example, "idx ++;", "p ->member" or "(-- idx)", which is in incorrect style, is not recongnized. This patch add detection for these cases.
Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
The nxstyle check tool recognizes the division operator as
a comment. Check the following content to determine whether
it is a comment.
Change-Id: Id07c6668489895b45a1042794bc3acca66cd3c47
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
This resolves issue 718: nxstyle line width check was ignoring the line width check for single line comments.
This turned out to be an artifact in parsing. Usually when parsing character by character, the file character to be parsed was '/n'. Howefver, in the case of parsing single line comments, the final character was the NUL terminator. This means that the lenth check was not being performed in the case of single line comments.
NOTE: Currently, I have suppressed error reports for single line right-hand comments. My fear is that this will unmask more standard violations than we can cope with. It is easy to re-enable and perhaps we should do that in the future:
/* Check for long lines
*
* REVISIT: Long line checks suppressed on right hand comments
* for now. This just prevents a large number of difficult-to-
* fix complaints that we would have otherwise.
*/
if (m > g_maxline && !rhcomment) <-- remote the second condition
The sub-string MHz is used frequently is pre-processor variable definitions. The section "Lowercase Exceptions" permits reasonable use of lowercase characters in pre-processor variable names and, given the frequency of the use of MHz (no pun intended), it certainly should qualify.
Allow "Public Function Prototypes" sections in .c files. Per the coding standard, all public function prototypes belong in .c files. However, there are some situations when the public function prototype is needed in a .c file and it shoudld, most correctly, be placed in a "Public Function Prototypes" section.
Checking for white-listed prefixes is also simpler now because the check is table driver. New data structure: g_white_prefix[] and new function white_prefix().
Clean up the no and unknown file extension info since only .h and .c
files supported. Just ignore them quietly.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>