mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 10:46:28 +08:00
Many changes to reduce complaints from CppCheck. Several latent bugs fixes, but probably some new typos introduced
This commit is contained in:
+112
-109
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -200,7 +200,7 @@ static void parse_args(int argc, char **argv)
|
||||
fprintf(stderr, "ERROR: Missing option argument, option: %c\n", optopt);
|
||||
show_usage(argv[0], EXIT_FAILURE);
|
||||
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "ERROR: Unexpected option: %c\n", ch);
|
||||
show_usage(argv[0], EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -2101,7 +2101,6 @@ static inline char *process_menu(FILE *stream, const char *kconfigdir)
|
||||
const char *paranum;
|
||||
char *menuname;
|
||||
char *token = NULL;
|
||||
char *ptr;
|
||||
|
||||
/* Get the menu information */
|
||||
|
||||
@@ -2114,7 +2113,7 @@ static inline char *process_menu(FILE *stream, const char *kconfigdir)
|
||||
|
||||
/* Process each line in the choice */
|
||||
|
||||
while ((ptr = kconfig_line(stream)) != NULL)
|
||||
while (kconfig_line(stream) != NULL)
|
||||
{
|
||||
/* Process the first token on the Kconfig file line */
|
||||
|
||||
@@ -2228,11 +2227,10 @@ static char *parse_kconfigfile(FILE *stream, const char *kconfigdir)
|
||||
{
|
||||
enum token_type_e tokid;
|
||||
char *token = NULL;
|
||||
char *ptr;
|
||||
|
||||
/* Process each line in the Kconfig file */
|
||||
|
||||
while ((ptr = kconfig_line(stream)) != NULL)
|
||||
while (kconfig_line(stream) != NULL)
|
||||
{
|
||||
/* Process the first token on the Kconfig file line */
|
||||
|
||||
@@ -2475,7 +2473,7 @@ int main(int argc, char **argv, char **envp)
|
||||
error("Missing option argument, option: %c\n", optopt);
|
||||
show_usage(argv[0], ERROR_MISSING_OPTION_ARGUMENT);
|
||||
|
||||
break;
|
||||
default:
|
||||
error("Unexpected option: %c\n", ch);
|
||||
show_usage(argv[0], ERROR_UNEXPECTED_OPTION);
|
||||
}
|
||||
|
||||
@@ -635,8 +635,6 @@ static char *cywin2windows(const char *str, const char *append, enum slashmode_e
|
||||
|
||||
if (append)
|
||||
{
|
||||
char *tmp;
|
||||
|
||||
alloclen = sizeof(str) + sizeof(append) + 1;
|
||||
allocpath = (char *)malloc(alloclen);
|
||||
if (!allocpath)
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ int main(int argc, char **argv, char **envp)
|
||||
fprintf(stderr, "Missing option argument, option: %c\n", optopt);
|
||||
show_usage(argv[0]);
|
||||
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unexpected option: %c\n", ch);
|
||||
show_usage(argv[0]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -606,7 +606,7 @@ int main(int argc, char **argv, char **envp)
|
||||
fprintf(stderr, "Missing option argument, option: %c\n", optopt);
|
||||
show_usage(argv[0]);
|
||||
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unexpected option: %c\n", ch);
|
||||
show_usage(argv[0]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user