diff options
Diffstat (limited to 'Tests/RunCMake/pseudo_tidy.c')
-rw-r--r-- | Tests/RunCMake/pseudo_tidy.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/pseudo_tidy.c b/Tests/RunCMake/pseudo_tidy.c index a43133b..f227c06 100644 --- a/Tests/RunCMake/pseudo_tidy.c +++ b/Tests/RunCMake/pseudo_tidy.c @@ -1,8 +1,13 @@ +#ifndef _CRT_SECURE_NO_WARNINGS +# define _CRT_SECURE_NO_WARNINGS +#endif + #include <stdio.h> #include <string.h> int main(int argc, char* argv[]) { + FILE* f; int i; for (i = 1; i < argc; ++i) { if (strcmp(argv[i], "-p") == 0) { @@ -20,6 +25,14 @@ int main(int argc, char* argv[]) fprintf(stderr, "stderr from bad command line arg '-bad'\n"); return 1; } + if (strncmp(argv[i], "--export-fixes=", 15) == 0) { + f = fopen(argv[i] + 15, "w"); + if (!f) { + fprintf(stderr, "Error opening %s for writing\n", argv[i] + 15); + return 1; + } + fclose(f); + } if (argv[i][0] != '-') { fprintf(stdout, "%s:0:0: warning: message [checker]\n", argv[i]); break; |