[CONCPP-18] Minor issues found when enabling more warnings Created: 2020-06-29  Updated: 2023-06-28  Resolved: 2023-06-28

Status: Closed
Project: MariaDB Connector/C++
Component/s: General
Affects Version/s: None
Fix Version/s: 1.0.3, 1.1.3

Type: Bug Priority: Minor
Reporter: Andrew Hutchings (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

A list of things found when more warnings enabled (-DCMAKE_CXX_FLAGS="-Wall -Wunused -Wwrite-strings -Wextra -Wundef -Wpacked"):

1. Some classes are initialised in the wrong order
2. Many methods using 'const' qualifiers where it is meaningless (mostly Value.h)
3. Many methods have unused parameters that haven't been declared as unused
4. Visual Studio warning suppressions in-use for all platforms (mostly in Consts.h)
5. VNONE not handled by switches in Value.cpp and Options.cpp
6. Utils.cpp:925 has just '1;' as a statement
7. DefaultOptions.cpp:930 and 969 needs parentheses
8. encryptPassword in Utils.cpp is an unused function
9. SelectResultSetCapi.cpp:788 first part of statement is always true
10. SelectResultSetCapi:810 if statement always true
11. DateParameter.cpp:35 bad initialisations (variables initialised with self)
12. Various signed difference during compares
13. BinRowProcotocolCapi.cpp lots of switch cases missing
14. BinRowProcotocolCapi.cpp:622 fall through should be explicitly marked
15. test_common.cpp:52 should have an ifdef, it is undefined in GCC
16. test_common.cpp has a bunch of unused functions



 Comments   
Comment by Lawrin Novitsky [ 2023-06-28 ]

Fixed all warning except for unknown(aka VS) pragmas, which, I think, are ok to live with.

Generated at Thu Feb 08 03:07:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.