Skip to content

[sql html] Clang-tidy Clazy Warnings #7525

@ferdymercury

Description

@ferdymercury
/opt/root_src/core/base/inc/TVersionCheck.h:31:1: warning: non-POD static (TVersionCheck) [clazy-non-pod-global-static]
/opt/root_src/sql/mysql/src/TMySQLStatement.cxx:766:25: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI]
 1: Assuming field 'fStmt' is not equal to null in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:168
 2: expanded from macro 'CheckStmt' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:77
 3: Taking false branch in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:168
 4: expanded from macro 'CheckStmt' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:77
 5: Assuming field 'fWorkingMode' is equal to 0 in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:169
 6: Taking false branch in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:169
 7: Assuming the condition is false in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:174
 8: Taking false branch in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:174
 9: Assuming 'meta' is non-null in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:179
10: Taking true branch in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:179
11: Value assigned to 'fgAllocSizeLimit' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:184
12: Assuming 'n' is < 'count' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:186
13: Loop condition is true.  Entering loop body in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:186
14: Assuming the condition is false in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:187
15: Calling 'TMySQLStatement::SetSQLParamType' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:187
16: 'npar' is >= 0 in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:729
17: Left side of '||' is false in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:729
18: Assuming 'npar' is < field 'fNumBuffers' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:729
19: Taking false branch in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:729
20: Control jumps to 'case MYSQL_TYPE_TINY:'  at line 745 in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:741
21:  Execution continues on line 764 in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:745
22: Assuming 'allocsize' is > 'fgAllocSizeLimit' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:764
23: Taking true branch in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:764
24: The value 0 is assigned to 'allocsize' in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:764
25: Call to 'malloc' has an allocation size of 0 bytes in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:766
/opt/root_src/sql/mysql/src/TMySQLStatement.cxx:940:15: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
 1: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 in /opt/root_src/sql/mysql/src/TMySQLStatement.cxx:940
/opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:808:4: warning: Null pointer passed as 1st argument to string copy function [clang-analyzer-unix.cstring.NullArg]
 1: Calling 'TPgSQLStatement::SetSQLParamType' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:806
 2: Assuming 'npar' is >= 0 in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 3: Left side of '||' is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 4: Assuming 'npar' is < field 'fNumBuffers' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 5: Taking false branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 6: Assuming 'maxsize' is < 0 in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:704
 7: Taking true branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:704
 8: Assuming the condition is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:705
 9: Taking false branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:705
10: Storing null pointer value in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:706
11: 'isbinary' is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:713
12: '?' condition is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:713
13: 'isbinary' is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:714
14: '?' condition is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:714
15: Returning the value 1 (loaded from 'kTRUE'), which participates in a condition later in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:716
16: Returning from 'TPgSQLStatement::SetSQLParamType' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:806
17: Taking false branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:806
18: Null pointer passed as 1st argument to string copy function in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:808
/opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:822:4: warning: Null pointer passed to 1st parameter expecting 'nonnull' [clang-analyzer-core.NonNullParamChecker]
 1: Assuming 'size' is <= 'maxsize' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:818
 2: Taking false branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:818
 3: Calling 'TPgSQLStatement::SetSQLParamType' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:820
 4: Assuming 'npar' is >= 0 in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 5: Left side of '||' is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 6: Assuming 'npar' is < field 'fNumBuffers' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 7: Taking false branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:702
 8: Assuming 'maxsize' is < 0 in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:704
 9: Taking true branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:704
10: Assuming the condition is false in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:705
11: Taking false branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:705
12: Storing null pointer value in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:706
13: 'isbinary' is true in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:713
14: '?' condition is true in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:713
15: 'isbinary' is true in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:714
16: '?' condition is true in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:714
17: Returning the value 1 (loaded from 'kTRUE'), which participates in a condition later in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:716
18: Returning from 'TPgSQLStatement::SetSQLParamType' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:820
19: Taking false branch in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:820
20: Null pointer passed to 1st parameter expecting 'nonnull' in /opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx:822
/opt/root_src/core/base/inc/TVersionCheck.h
/opt/root_src/sql/mysql/src/TMySQLStatement.cxx
/opt/root_src/sql/pgsql/src/TPgSQLStatement.cxx

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions