Closed zufuliu closed 4 years ago
codelite/CodeLite/performance.cpp: In function 'void PERF_START(const char*)':
codelite/CodeLite/performance.cpp:50:82: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'std::vector<std::pair<long unsigned int, long unsigned int> >::size_type {aka long long unsigned int}' [-Wformat=]
fprintf(dbgFile, "%*c<block name=\"%s\">\n", 4*tickCounts.size(), ' ', func_name);
~~~~~~~~~~~~~~~~~~~ ^
codelite/CodeLite/performance.cpp: In function 'void PERF_END()':
codelite/CodeLite/performance.cpp:57:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (tickCounts.empty())
^~
codelite/CodeLite/performance.cpp:60:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
DWORD tickCount = GetTickCount();
^~~~~
codelite/CodeLite/performance.cpp:64:83: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'std::vector<std::pair<long unsigned int, long unsigned int> >::size_type {aka long long unsigned int}' [-Wformat=]
fprintf(dbgFile, "%*c<elapsed time=\"%ld\"", 4*tickCounts.size(), ' ', elapsed);
~~~~~~~~~~~~~~~~~~~ ^
codelite/CodeLite/performance.cpp:75:63: warning: field width specifier '*' expects argument of type 'int', but argument 3 has type 'std::vector<std::pair<long unsigned int, long unsigned int> >::size_type {aka long long unsigned int}' [-Wformat=]
fprintf(dbgFile, "%*c</block>\n", 4*tickCounts.size(), ' ');
~~~~~~~~~~~~~~~~~~~ ^
codelite/CodeLite/lex.yy.cpp: In member function 'virtual int flex::yyFlexLexer::yylex()':
codelite/CodeLite/lex.yy.cpp:1118:10: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (m_keepComments)
^~
codelite/CodeLite/lex.yy.cpp:1120:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
while ((c = yyinput()) != '\n' && c != EOF)
^~~~~
In file included from codelite/SpellChecker/hunspell/affixmgr.cxx:12:0:
codelite/SpellChecker/hunspell/affentry.hxx:30:105: warning: converting to non-pointer type 'short unsigned int' from NULL [-Wconversion-null]
struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
^~~~
codelite/SpellChecker/hunspell/affentry.hxx:93:114: warning: converting to non-pointer type 'short unsigned int' from NULL [-Wconversion-null]
struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
^~~~
codelite/CodeLite/scope_parser.cpp: In function 'int cl_scope_parse()':
codelite/CodeLite/scope_parser.cpp:856:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/CodeLite/scope_parser.cpp:900:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("syntax error");
^
codelite/CodeLite/scope_parser.cpp:1355:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("yacc stack overflow");
^
codelite/CodeLite/cpp_expr_parser.cpp: In function 'int cl_expr_parse()':
codelite/CodeLite/cpp_expr_parser.cpp:554:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/CodeLite/cpp_expr_parser.cpp:598:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("syntax error");
^
codelite/CodeLite/cpp_expr_parser.cpp:971:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("yacc stack overflow");
^
codelite/CodeLite/cpp_func_parser.cpp: In function 'int cl_func_parse()':
codelite/CodeLite/cpp_func_parser.cpp:648:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/CodeLite/cpp_func_parser.cpp:692:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("syntax error");
^
codelite/CodeLite/cpp_func_parser.cpp:1044:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("yacc stack overflow");
^
codelite/CodeLite/var_parser.cpp: In function 'int cl_var_parse()':
codelite/CodeLite/var_parser.cpp:770:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/CodeLite/var_parser.cpp:814:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("syntax error");
^
codelite/CodeLite/var_parser.cpp:1418:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("yacc stack overflow");
^
codelite/CodeLite/typedef_parser.cpp: In function 'int cl_typedef_parse()':
codelite/CodeLite/typedef_parser.cpp:552:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/CodeLite/typedef_parser.cpp:596:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("syntax error");
^
codelite/CodeLite/typedef_parser.cpp:933:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("yacc stack overflow");
^
codelite/CodeLite/pp.cpp:329:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/Debugger/gdb_result_parser.cpp: In function 'int gdb_result_parse()':
codelite/Debugger/gdb_result_parser.cpp:513:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/LiteEditor/clang_result_parser.cpp:446:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (yyn = yydefred[yystate]) goto yyreduce;
~~~~^~~~~~~~~~~~~~~~~~~
codelite/LiteEditor/clang_result_parser.cpp:490:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("syntax error");
^
codelite/LiteEditor/clang_result_parser.cpp:727:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
yyerror("yacc stack overflow");
^
other warnings | count |
---|---|
dynamic exception specifications are deprecated in C++11 [-Wdeprecated] | 743 |
type qualifiers ignored on function return type [-Wignored-qualifiers] | 1478 |
should be explicitly initialized in the copy constructor [-Wextra] | 111 |
this statement may fall through [-Wimplicit-fallthrough=] | 12 |
suggest braces around empty body in an 'if' statement [-Wempty-body] | 101 |
[-Wreorder] | 30 |
will be initialized after [-Wreorder] | 10 |
[-Wmissing-field-initializers] | 16 |
comparison between signed and unsigned integer expressions [-Wsign-compare] | 7 |
[-Wmisleading-indentation] | 7 |
[-Wunused-parameter] | 2071 |
These warning is produced by MinGW-w64 GCC with -Wall -Wextra
flags. (I don't add -Wshadow
, because GCC warns method parameter shadow object field, however local variable shadow exits in CodeLite.)
gcc -v
:
Thread model: posix
gcc version 7.1.0 (x86_64-posix-seh-rev2, Built by MinGW-W64 project)
I had mentioned some warnings in issue #1710, however not full fixed.
PR #1728 fixed some warnings, especially dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.