2025-05-08 11:32 ftp://ftp.de.debian.org/debian/pool/main/t/toga2/toga2_3.0.0.1SE1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.17.0 head-info: ebc80c0 (2025-05-07 18:59:31 +0200) count: 252 251 elapsed-time: 15.5 14.9 head-timing-info: old-timing-info: head results: toga2-3.0.0.1SE1/src/move.h:23:43: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck] toga2-3.0.0.1SE1/src/attack.cpp:251:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:252:8: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:350:8: style: The scope of the variable 'sq' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:350:12: style: The scope of the variable 'inc' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:380:8: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:380:15: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:460:15: style: The scope of the variable 'inc' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:462:8: style: The scope of the variable 'sq' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/attack.cpp:481:13: style: Variable 'to' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/board.cpp:303:13: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] toga2-3.0.0.1SE1/src/board.cpp:305:15: note: Found duplicate branches for 'if' and 'else'. toga2-3.0.0.1SE1/src/board.cpp:303:13: note: Found duplicate branches for 'if' and 'else'. toga2-3.0.0.1SE1/src/board.cpp:34:8: style: The scope of the variable 'size' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/board.cpp:215:16: style: The scope of the variable 'pos' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/board.cpp:216:11: style: The scope of the variable 'size' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/board.cpp:416:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/board.cpp:300:16: style: Variable 'sq' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/book.cpp:60:57: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/book.cpp:72:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/book.cpp:177:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/book.cpp:204:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EOF [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/book.cpp:82:8: style: The scope of the variable 'best_move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:83:8: style: The scope of the variable 'best_score' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:84:8: style: The scope of the variable 'pos' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:86:8: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:87:8: style: The scope of the variable 'score' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:89:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:136:21: style: The scope of the variable 'mid' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:193:8: style: The scope of the variable 'b' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:306:8: style: The scope of the variable 'wb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:306:12: style: The scope of the variable 'bb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:502:8: style: The scope of the variable 'me' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:502:12: style: The scope of the variable 'opp' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:741:8: style: The scope of the variable 'me' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:741:12: style: The scope of the variable 'opp' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:742:8: style: The scope of the variable 'opp_flag' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:748:16: style: The scope of the variable 'unit' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:752:8: style: The scope of the variable 'piece_nb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:752:18: style: The scope of the variable 'attackvalue' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1019:12: style: The scope of the variable 'opp' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1020:8: style: The scope of the variable 'from' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1024:8: style: The scope of the variable 'king' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1025:17: style: The scope of the variable 'ptr' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1026:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1027:8: style: The scope of the variable 'attack_tot' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1028:8: style: The scope of the variable 'piece_nb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1029:8: style: The scope of the variable 'king_file' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1029:19: style: The scope of the variable 'king_rank' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1199:8: style: The scope of the variable 'att' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1199:13: style: The scope of the variable 'def' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:1818:8: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:2033:8: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:2205:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/eval.cpp:307:18: style: Unused variable: probe_score [unusedVariable] toga2-3.0.0.1SE1/src/eval.cpp:1154:14: style: Variable 'king_file' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1155:14: style: Variable 'king_rank' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1219:20: style: Variable 'white_passed_nb' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1220:20: style: Variable 'black_passed_nb' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1439:11: style: Variable 'rank' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1499:8: style: Variable 'opp' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1826:7: style: Variable 'wk' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1890:7: style: Variable 'wk' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1897:7: style: Variable 'bk' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1934:7: style: Variable 'wk' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:1937:7: style: Variable 'wn' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:2041:7: style: Variable 'wk' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/eval.cpp:2104:8: style: Unused variable: type [unusedVariable] toga2-3.0.0.1SE1/src/hash.cpp:110:18: style: The scope of the variable 'count' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/list.cpp:69:8: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/list.cpp:69:14: style: The scope of the variable 'value' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/list.cpp:125:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/list.cpp:141:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/list.cpp:141:17: style: The scope of the variable 'value' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/material.cpp:129:32: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/material.cpp:120:6: style: The scope of the variable 'ThreadId' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/material.cpp:140:6: style: The scope of the variable 'ThreadId' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/material.cpp:420:15: style: Variable 'b_min' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/material.cpp:454:15: style: Variable 'b_maj' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/material.cpp:556:15: style: Variable 'w_min' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/material.cpp:590:15: style: Variable 'w_maj' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/material.cpp:235:8: style: Unused variable: WhiteMinors [unusedVariable] toga2-3.0.0.1SE1/src/material.cpp:235:20: style: Unused variable: BlackMinors [unusedVariable] toga2-3.0.0.1SE1/src/material.cpp:235:32: style: Unused variable: WhiteMajors [unusedVariable] toga2-3.0.0.1SE1/src/material.cpp:235:44: style: Unused variable: BlackMajors [unusedVariable] toga2-3.0.0.1SE1/src/move.cpp:154:15: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_check.cpp:280:9: style: The scope of the variable 'check' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_check.cpp:331:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_check.cpp:332:8: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:58:15: style: The scope of the variable 'pos' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:60:8: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:62:8: style: The scope of the variable 'pawn' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:62:14: style: The scope of the variable 'rook' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:227:15: style: The scope of the variable 'pos' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:228:8: style: The scope of the variable 'rook' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:407:8: style: The scope of the variable 'sq_64' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:408:11: style: The scope of the variable 'hash_xor' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:540:8: style: The scope of the variable 'sq_64' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:541:11: style: The scope of the variable 'hash_xor' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:674:8: style: The scope of the variable 'from_64' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:674:17: style: The scope of the variable 'to_64' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:675:8: style: The scope of the variable 'piece_12' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:676:8: style: The scope of the variable 'piece_index' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_do.cpp:677:11: style: The scope of the variable 'hash_xor' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_evasion.cpp:264:14: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:117:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:118:18: style: The scope of the variable 'inc_ptr' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:197:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:405:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:637:8: style: The scope of the variable 'from' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:638:8: style: The scope of the variable 'me' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:639:8: style: The scope of the variable 'inc' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_gen.cpp:640:8: style: The scope of the variable 'pawn' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_legal.cpp:226:30: style: Variable 'board->square[from]' is reassigned a value before the old one has been used. [redundantAssignment] toga2-3.0.0.1SE1/src/move_legal.cpp:224:30: note: board->square[from] is assigned toga2-3.0.0.1SE1/src/move_legal.cpp:226:30: note: board->square[from] is overwritten toga2-3.0.0.1SE1/src/move_legal.cpp:31:8: style: The scope of the variable 'inc' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_legal.cpp:31:13: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_legal.cpp:113:8: style: The scope of the variable 'inc' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_legal.cpp:113:13: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_legal.cpp:188:8: style: The scope of the variable 'king' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/move_legal.cpp:244:54: style: Parameter 'board' can be declared as pointer to const [constParameterPointer] toga2-3.0.0.1SE1/src/move_legal.cpp:49:8: style: Variable 'opp' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/move_legal.cpp:133:8: style: Variable 'opp' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/option.cpp:149:11: warning: Either the condition 'opt==NULL' is redundant or there is possible null pointer dereference: opt. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/option.cpp:147:12: note: Assuming that condition 'opt==NULL' is not redundant toga2-3.0.0.1SE1/src/option.cpp:149:11: note: Null pointer dereference toga2-3.0.0.1SE1/src/option.cpp:142:15: style: Variable 'opt' can be declared as pointer to const [constVariablePointer] toga2-3.0.0.1SE1/src/pawn.cpp:208:28: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/pawn.cpp:100:8: style: The scope of the variable 'first' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:100:15: style: The scope of the variable 'last' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:100:21: style: The scope of the variable 'count' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:101:11: style: The scope of the variable 'rev' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:199:6: style: The scope of the variable 'ThreadId' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:219:6: style: The scope of the variable 'ThreadId' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:308:55: style: The scope of the variable 'passed' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:311:8: style: The scope of the variable 'bits' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/pawn.cpp:393:17: style: Variable 'passed' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/pawn.cpp:446:23: style: Variable 'passed' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/posix.cpp:123:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/posix.cpp:149:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/posix.cpp:169:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RUSAGE_SELF [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/probe.cpp:59:15: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/probe.cpp:60:20: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/probe.cpp:51:13: style: The scope of the variable 'load_egbb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:699:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/protocol.cpp:717:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/protocol.cpp:311:10: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:313:15: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:313:52: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:319:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:327:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:335:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:347:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:355:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:363:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:371:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:387:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:395:16: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] toga2-3.0.0.1SE1/src/protocol.cpp:322:29: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:320:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:322:29: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:330:30: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:328:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:330:30: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:338:23: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:336:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:338:23: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:350:22: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:348:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:350:22: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:358:27: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:356:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:358:27: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:366:33: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:364:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:366:33: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:390:29: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:388:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:390:29: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:398:30: warning: Either the condition 'ptr==NULL' is redundant or there is possible null pointer dereference: ptr. [nullPointerRedundantCheck] toga2-3.0.0.1SE1/src/protocol.cpp:396:18: note: Assuming that condition 'ptr==NULL' is not redundant toga2-3.0.0.1SE1/src/protocol.cpp:398:30: note: Null pointer dereference toga2-3.0.0.1SE1/src/protocol.cpp:591:15: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/protocol.cpp:313:13: style: Variable 'ptr' is reassigned a value before the old one has been used. [redundantAssignment] toga2-3.0.0.1SE1/src/protocol.cpp:311:8: note: ptr is assigned toga2-3.0.0.1SE1/src/protocol.cpp:313:13: note: ptr is overwritten toga2-3.0.0.1SE1/src/protocol.cpp:154:6: style: The scope of the variable 'ThreadId' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:289:11: style: The scope of the variable 'time_max' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:289:21: style: The scope of the variable 'alloc' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:505:17: style: The scope of the variable 'ptr' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:506:9: style: The scope of the variable 'move_string' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:507:8: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:568:9: style: The scope of the variable 'egbb_cache_size' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:569:9: style: The scope of the variable 'egbb_path' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:634:9: style: The scope of the variable 'ponder_string' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/protocol.cpp:637:11: style: Variable 'pv' can be declared as pointer to const [constVariablePointer] toga2-3.0.0.1SE1/src/protocol.cpp:301:10: style: Variable 'nodes' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/protocol.cpp:374:16: style: Variable 'nodes' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/pv.cpp:21:8: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:339:19: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/search.cpp:820:10: style: Variable 'speed' is reassigned a value before the old one has been used. [redundantAssignment] toga2-3.0.0.1SE1/src/search.cpp:817:13: note: speed is assigned toga2-3.0.0.1SE1/src/search.cpp:820:10: note: speed is overwritten toga2-3.0.0.1SE1/src/search.cpp:239:8: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:357:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:360:11: style: The scope of the variable 'node_nb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:361:11: style: The scope of the variable 'speed' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:568:8: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:568:14: style: The scope of the variable 'value' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:568:21: style: The scope of the variable 'flags' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:568:28: style: The scope of the variable 'depth' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:568:35: style: The scope of the variable 'max_depth' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:569:17: style: The scope of the variable 'pv' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:570:11: style: The scope of the variable 'time' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:571:11: style: The scope of the variable 'node_nb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:572:8: style: The scope of the variable 'mate' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:572:14: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:572:17: style: The scope of the variable 'z' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:573:9: style: The scope of the variable 'found' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:574:9: style: The scope of the variable 'move_string' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:574:27: style: The scope of the variable 'pv_string' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:718:8: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:718:14: style: The scope of the variable 'move_pos' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:718:24: style: The scope of the variable 'move_nb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:719:11: style: The scope of the variable 'time' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:720:11: style: The scope of the variable 'node_nb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:721:9: style: The scope of the variable 'move_string' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:806:11: style: The scope of the variable 'time' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:806:17: style: The scope of the variable 'speed' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:806:24: style: The scope of the variable 'cpu' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:807:11: style: The scope of the variable 'node_nb' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:808:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search.cpp:747:16: style: Variable 'timer' can be declared as pointer to const [constVariablePointer] toga2-3.0.0.1SE1/src/search.cpp:731:18: style: Variable 'move_nb' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/search.cpp:733:15: style: Variable 'time' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/search.cpp:734:18: style: Variable 'node_nb' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/search_full.cpp:804:17: style: Condition 'reduced' is always true [knownConditionTrueFalse] toga2-3.0.0.1SE1/src/search_full.cpp:800:31: note: Assuming that condition 'reduced' is not redundant toga2-3.0.0.1SE1/src/search_full.cpp:804:17: note: Condition 'reduced' is always true toga2-3.0.0.1SE1/src/search_full.cpp:288:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search_full.cpp:1303:8: style: The scope of the variable 'trans_move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search_full.cpp:1303:20: style: The scope of the variable 'trans_depth' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search_full.cpp:1384:14: style: The scope of the variable 'to' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search_full.cpp:1385:8: style: The scope of the variable 'capture' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/search_full.cpp:434:8: style: Local variable 'FutilityMargin' shadows outer variable [shadowVariable] toga2-3.0.0.1SE1/src/search_full.cpp:93:18: note: Shadowed declaration toga2-3.0.0.1SE1/src/search_full.cpp:434:8: note: Shadow variable toga2-3.0.0.1SE1/src/search_full.cpp:145:48: style: Parameter 'board' can be declared as pointer to const [constParameterPointer] toga2-3.0.0.1SE1/src/search_full.cpp:688:33: style: Variable 'value' is assigned a value that is never used. [unreadVariable] toga2-3.0.0.1SE1/src/search_full.cpp:436:8: style: Unused variable: newHistoryValue [unusedVariable] toga2-3.0.0.1SE1/src/search_full.cpp:984:8: style: Unused variable: probe_score [unusedVariable] toga2-3.0.0.1SE1/src/search_full.cpp:984:21: style: Unused variable: probe_depth [unusedVariable] toga2-3.0.0.1SE1/src/see.cpp:250:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/see.cpp:251:8: style: The scope of the variable 'delta' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/see.cpp:301:8: style: The scope of the variable 'sq' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/see.cpp:301:12: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:480:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:589:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:589:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:611:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:611:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:631:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:631:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:651:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:651:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:671:8: style: The scope of the variable 'i' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:671:11: style: The scope of the variable 'move' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:800:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:835:8: style: The scope of the variable 'piece' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/sort.cpp:835:24: style: The scope of the variable 'promote' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/trans.cpp:160:19: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/trans.cpp:258:8: style: The scope of the variable 'score' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/trans.cpp:202:18: error: Uninitialized variables: *clear_entry.value, *clear_entry.nproc [uninitvar] toga2-3.0.0.1SE1/src/util.cpp:43:33: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RAND_MAX [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/util.cpp:75:73: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/util.cpp:98:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/util.cpp:119:65: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] toga2-3.0.0.1SE1/src/util.cpp:169:14: style: C-style pointer casting [cstyleCast] toga2-3.0.0.1SE1/src/util.cpp:142:8: style: The scope of the variable 'c1' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/util.cpp:142:12: style: The scope of the variable 'c2' can be reduced. [variableScope] toga2-3.0.0.1SE1/src/book.cpp:19:1: error: The one definition rule is violated, different classes/structs have the same name 'entry_t' [ctuOneDefinitionRuleViolation] toga2-3.0.0.1SE1/src/trans.h:28:1: note: The one definition rule is violated, different classes/structs have the same name 'entry_t' toga2-3.0.0.1SE1/src/book.cpp:19:1: note: The one definition rule is violated, different classes/structs have the same name 'entry_t' diff: head toga2-3.0.0.1SE1/src/protocol.cpp:313:52: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] DONE