mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
tools/nxstyle.c: Fix a rare false alarm that could occur if a variable or function name begins with the sub-string 'union' or 'struct'. misc fixes under fs/ and sched/ from application of current version of nxstyle.
This commit is contained in:
+4
-4
@@ -487,8 +487,8 @@ int main(int argc, char **argv, char **envp)
|
||||
strncmp(&line[indent], "CODE ", 5) == 0 ||
|
||||
strncmp(&line[indent], "const ", 6) == 0 ||
|
||||
strncmp(&line[indent], "double ", 7) == 0 ||
|
||||
// strncmp(&line[indent], "struct ", 7) == 0 ||
|
||||
strncmp(&line[indent], "struct", 6) == 0 || /* May be unnamed */
|
||||
strncmp(&line[indent], "struct ", 7) == 0 ||
|
||||
strncmp(&line[indent], "struct\n", 7) == 0 || /* May be unnamed */
|
||||
strncmp(&line[indent], "enum ", 5) == 0 ||
|
||||
strncmp(&line[indent], "extern ", 7) == 0 ||
|
||||
strncmp(&line[indent], "EXTERN ", 7) == 0 ||
|
||||
@@ -510,8 +510,8 @@ int main(int argc, char **argv, char **envp)
|
||||
strncmp(&line[indent], "uint8_t ", 8) == 0 ||
|
||||
strncmp(&line[indent], "uint16_t ", 9) == 0 ||
|
||||
strncmp(&line[indent], "uint32_t ", 9) == 0 ||
|
||||
// strncmp(&line[indent], "union ", 6) == 0 ||
|
||||
strncmp(&line[indent], "union", 5) == 0 || /* May be unnamed */
|
||||
strncmp(&line[indent], "union ", 6) == 0 ||
|
||||
strncmp(&line[indent], "union\n", 6) == 0 || /* May be unnamed */
|
||||
strncmp(&line[indent], "unsigned ", 9) == 0 ||
|
||||
strncmp(&line[indent], "void ", 5) == 0 ||
|
||||
strncmp(&line[indent], "volatile ", 9) == 0)
|
||||
|
||||
Reference in New Issue
Block a user