Skip to content

[rootx main] Clang-Tidy Clazy Warnings #7527

@ferdymercury

Description

@ferdymercury
/opt/root_src/rootx/src/rootx.cxx:148:17: warning: Potential leak of memory pointed to by 'env' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Calling 'SetRootSys' in /opt/root_src/rootx/src/rootx.cxx:297
 2: Assuming 'exepath' is non-null in /opt/root_src/rootx/src/rootx.cxx:133
 3: Left side of '&&' is true in /opt/root_src/rootx/src/rootx.cxx:133
 4: Assuming the condition is true in /opt/root_src/rootx/src/rootx.cxx:133
 5: Taking true branch in /opt/root_src/rootx/src/rootx.cxx:133
 6: Assuming 's' is non-null in /opt/root_src/rootx/src/rootx.cxx:138
 7: Taking true branch in /opt/root_src/rootx/src/rootx.cxx:138
 8: Assuming 's' is non-null in /opt/root_src/rootx/src/rootx.cxx:140
 9: Taking true branch in /opt/root_src/rootx/src/rootx.cxx:140
10: Memory is allocated in /opt/root_src/rootx/src/rootx.cxx:143
11: Potential leak of memory pointed to by 'env' in /opt/root_src/rootx/src/rootx.cxx:148
/opt/root_src/rootx/src/rootx.cxx:213:1: warning: Potential leak of memory pointed to by 'msg' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:299
 2: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:299
 3: Assuming 'i' is >= 'argc' in /opt/root_src/rootx/src/rootx.cxx:313
 4: Loop condition is false. Execution continues on line 328 in /opt/root_src/rootx/src/rootx.cxx:313
 5: 'notebook' is <= 0 in /opt/root_src/rootx/src/rootx.cxx:328
 6: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:328
 7: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:358
 8: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:358
 9: 'batch' is false in /opt/root_src/rootx/src/rootx.cxx:362
10: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:362
11: 'about' is false in /opt/root_src/rootx/src/rootx.cxx:364
12: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:364
13: 'batch' is false in /opt/root_src/rootx/src/rootx.cxx:369
14: Taking true branch in /opt/root_src/rootx/src/rootx.cxx:369
15: 'about' is false in /opt/root_src/rootx/src/rootx.cxx:370
16: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:370
17: Assuming 'gNoLogo' is true in /opt/root_src/rootx/src/rootx.cxx:374
18: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:374
19: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:420
20: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:420
21: Assuming 'gChildpid' is <= 0 in /opt/root_src/rootx/src/rootx.cxx:423
22: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:423
23: Loop condition is false. Execution continues on line 457 in /opt/root_src/rootx/src/rootx.cxx:455
24: Calling 'SetLibraryPath' in /opt/root_src/rootx/src/rootx.cxx:461
25: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:190
26: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:190
27: Memory is allocated in /opt/root_src/rootx/src/rootx.cxx:195
28: Potential leak of memory pointed to by 'msg' in /opt/root_src/rootx/src/rootx.cxx:213
/opt/root_src/rootx/src/rootx.cxx:351:7: warning: Potential leak of memory pointed to by 'argvv' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:299
 2: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:299
 3: Assuming 'i' is < 'argc' in /opt/root_src/rootx/src/rootx.cxx:313
 4: Loop condition is true.  Entering loop body in /opt/root_src/rootx/src/rootx.cxx:313
 5: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:314
 6: Left side of '||' is false in /opt/root_src/rootx/src/rootx.cxx:314
 7: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:314
 8: Left side of '||' is false in /opt/root_src/rootx/src/rootx.cxx:314
 9: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:315
10: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:314
11: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:319
12: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:319
13: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:320
14: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:320
15: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:321
16: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:321
17: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:322
18: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:322
19: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:323
20: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:323
21: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:324
22: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:324
23: Taking true branch in /opt/root_src/rootx/src/rootx.cxx:325
24:  Execution continues on line 328 in /opt/root_src/rootx/src/rootx.cxx:325
25: 'notebook' is > 0 in /opt/root_src/rootx/src/rootx.cxx:328
26: Taking true branch in /opt/root_src/rootx/src/rootx.cxx:328
27: Memory is allocated in /opt/root_src/rootx/src/rootx.cxx:341
28: 'i' is < 'numnbargs' in /opt/root_src/rootx/src/rootx.cxx:343
29: Loop condition is true.  Entering loop body in /opt/root_src/rootx/src/rootx.cxx:343
30: Assuming 'i' is >= 'numnbargs' in /opt/root_src/rootx/src/rootx.cxx:343
31: Loop condition is false. Execution continues on line 345 in /opt/root_src/rootx/src/rootx.cxx:343
32: Potential leak of memory pointed to by 'argvv' in /opt/root_src/rootx/src/rootx.cxx:351
/opt/root_src/rootx/src/rootx.cxx:468:4: warning: Potential leak of memory pointed to by 'argvv' [clang-analyzer-cplusplus.NewDeleteLeaks]
 1: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:299
 2: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:299
 3: Assuming 'i' is >= 'argc' in /opt/root_src/rootx/src/rootx.cxx:313
 4: Loop condition is false. Execution continues on line 328 in /opt/root_src/rootx/src/rootx.cxx:313
 5: 'notebook' is <= 0 in /opt/root_src/rootx/src/rootx.cxx:328
 6: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:328
 7: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:358
 8: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:358
 9: 'batch' is false in /opt/root_src/rootx/src/rootx.cxx:362
10: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:362
11: 'about' is false in /opt/root_src/rootx/src/rootx.cxx:364
12: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:364
13: 'batch' is false in /opt/root_src/rootx/src/rootx.cxx:369
14: Taking true branch in /opt/root_src/rootx/src/rootx.cxx:369
15: 'about' is false in /opt/root_src/rootx/src/rootx.cxx:370
16: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:370
17: Assuming 'gNoLogo' is true in /opt/root_src/rootx/src/rootx.cxx:374
18: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:374
19: Assuming the condition is false in /opt/root_src/rootx/src/rootx.cxx:420
20: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:420
21: Assuming 'gChildpid' is <= 0 in /opt/root_src/rootx/src/rootx.cxx:423
22: Taking false branch in /opt/root_src/rootx/src/rootx.cxx:423
23: Memory is allocated in /opt/root_src/rootx/src/rootx.cxx:443
24: Loop condition is false. Execution continues on line 457 in /opt/root_src/rootx/src/rootx.cxx:455
25: Potential leak of memory pointed to by 'argvv' in /opt/root_src/rootx/src/rootx.cxx:468
/opt/root_src/rootx/src/rootxx.cxx:783:10: 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/rootx/src/rootxx.cxx:783
/opt/root_src/rootx/src/rootx.cxx
/opt/root_src/rootx/src/rootxx.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