2022-06-28 07:00 ftp://ftp.de.debian.org/debian/pool/main/g/gnushogi/gnushogi_1.5~git20140725.orig.tar.gz cppcheck-options: --library=posix --library=gnu --showtime=top5 --check-library --inconclusive --enable=style,information --template=daca2 -D__GNUC__ --platform=unix64 -rp=temp -j2 platform: Linux-5.4.0-110-generic-x86_64-with-glibc2.29 python: 3.8.10 client-version: 1.3.24 compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 cppcheck: head 2.8 head-info: cdeebc1 (2022-06-27 20:55:09 +0200) count: 144 144 elapsed-time: 24.5 38.7 head-timing-info: Overall time: 0s old-timing-info: Overall time: 0s head results: gnushogi-1.5pre/gnushogi/book.c:104:37: style: Condition 't!=0' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/book.c:104:25: note: Assuming that condition 'f!=0' is not redundant gnushogi-1.5pre/gnushogi/book.c:104:12: note: Assuming that condition 'f==t' is not redundant gnushogi-1.5pre/gnushogi/book.c:104:37: note: Condition 't!=0' is always false gnushogi-1.5pre/gnushogi/book.c:698:13: warning: %ld in format string (no. 2) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] gnushogi-1.5pre/gnushogi/book.c:698:13: warning: %ld in format string (no. 3) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] gnushogi-1.5pre/gnushogi/book.c:798:37: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] gnushogi-1.5pre/gnushogi/book.c:798:37: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gnushogi-1.5pre/gnushogi/book.c:883:1: error: Resource leak: fd [resourceLeak] gnushogi-1.5pre/gnushogi/book.c:79:11: style: Local variable 'promoted' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/gnushogi.h:774:26: note: Shadowed declaration gnushogi-1.5pre/gnushogi/book.c:79:11: note: Shadow variable gnushogi-1.5pre/gnushogi/book.c:222:15: style: Local variable 'color' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/gnushogi.h:687:29: note: Shadowed declaration gnushogi-1.5pre/gnushogi/book.c:222:15: note: Shadow variable gnushogi-1.5pre/gnushogi/book.c:226:26: style: Local variable 'c' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/book.c:175:12: note: Shadowed declaration gnushogi-1.5pre/gnushogi/book.c:226:26: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:1137:60: warning: Comparison of a boolean expression with an integer other than 0 or 1. [compareBoolExpressionWithInt] gnushogi-1.5pre/gnushogi/eval.c:1727:5: warning: Either the condition '(ad=Kdist[c2][sq])<=10' is redundant or the array 'EnemyKingDistanceBonus[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] gnushogi-1.5pre/gnushogi/eval.c:1727:5: note: Assuming that condition '(ad=Kdist[c2][sq])<=10' is not redundant gnushogi-1.5pre/gnushogi/eval.c:1727:5: note: Array index out of bounds gnushogi-1.5pre/gnushogi/eval.c:1744:5: warning: Either the condition '(ad=Kdist[c2][sq])<=10' is redundant or the array 'EnemyKingDistanceBonus[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] gnushogi-1.5pre/gnushogi/eval.c:1744:5: note: Assuming that condition '(ad=Kdist[c2][sq])<=10' is not redundant gnushogi-1.5pre/gnushogi/eval.c:1744:5: note: Array index out of bounds gnushogi-1.5pre/gnushogi/eval.c:1760:5: warning: Either the condition '(ad=Kdist[c2][sq])<=10' is redundant or the array 'EnemyKingDistanceBonus[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] gnushogi-1.5pre/gnushogi/eval.c:1760:5: note: Assuming that condition '(ad=Kdist[c2][sq])<=10' is not redundant gnushogi-1.5pre/gnushogi/eval.c:1760:5: note: Array index out of bounds gnushogi-1.5pre/gnushogi/eval.c:1777:5: warning: Either the condition '(ad=Kdist[c2][sq])<=10' is redundant or the array 'EnemyKingDistanceBonus[10]' is accessed at index 10, which is out of bounds. [arrayIndexOutOfBoundsCond] gnushogi-1.5pre/gnushogi/eval.c:1777:5: note: Assuming that condition '(ad=Kdist[c2][sq])<=10' is not redundant gnushogi-1.5pre/gnushogi/eval.c:1777:5: note: Array index out of bounds gnushogi-1.5pre/gnushogi/eval.c:1672:24: style: Expression is always true because 'else if' condition is opposite to previous condition at line 1668. [multiCondition] gnushogi-1.5pre/gnushogi/eval.c:1668:19: note: first condition gnushogi-1.5pre/gnushogi/eval.c:1672:24: note: else if condition is opposite to first condition gnushogi-1.5pre/gnushogi/eval.c:1694:24: style: Expression is always true because 'else if' condition is opposite to previous condition at line 1686. [multiCondition] gnushogi-1.5pre/gnushogi/eval.c:1686:19: note: first condition gnushogi-1.5pre/gnushogi/eval.c:1694:24: note: else if condition is opposite to first condition gnushogi-1.5pre/gnushogi/eval.c:1470:9: style: Condition '!checked_trapped' is always true [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/eval.c:1464:33: note: Assignment 'checked_trapped=0', assigned value is 0 gnushogi-1.5pre/gnushogi/eval.c:1470:9: note: Condition '!checked_trapped' is always true gnushogi-1.5pre/gnushogi/eval.c:1137:63: style: Comparing expression of type 'bool' against value 2. Condition is always false. [compareValueOutOfTypeRangeError] gnushogi-1.5pre/gnushogi/eval.c:841:12: style: Variable 'rvalue' is reassigned a value before the old one has been used. [redundantAssignment] gnushogi-1.5pre/gnushogi/eval.c:839:12: note: rvalue is assigned gnushogi-1.5pre/gnushogi/eval.c:841:12: note: rvalue is overwritten gnushogi-1.5pre/gnushogi/eval.c:2052:28: style:inconclusive: Function 'ScorePatternDistance' argument 1 names different: declaration 'side' definition 'c1'. [funcArgNamesDifferent] gnushogi-1.5pre/gnushogi/gnushogi.h:1036:41: note: Function 'ScorePatternDistance' argument 1 names different: declaration 'side' definition 'c1'. gnushogi-1.5pre/gnushogi/eval.c:2052:28: note: Function 'ScorePatternDistance' argument 1 names different: declaration 'side' definition 'c1'. gnushogi-1.5pre/gnushogi/eval.c:2747:21: style:inconclusive: Function 'UpdateWeights' argument 1 names different: declaration 'side' definition 'stage'. [funcArgNamesDifferent] gnushogi-1.5pre/gnushogi/gnushogi.h:1038:34: note: Function 'UpdateWeights' argument 1 names different: declaration 'side' definition 'stage'. gnushogi-1.5pre/gnushogi/eval.c:2747:21: note: Function 'UpdateWeights' argument 1 names different: declaration 'side' definition 'stage'. gnushogi-1.5pre/gnushogi/eval.c:1112:23: style: Local variable 'ptyp' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/eval.c:1097:14: note: Shadowed declaration gnushogi-1.5pre/gnushogi/eval.c:1112:23: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:1464:15: style: Local variable 'checked_trapped' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/eval.c:1208:14: note: Shadowed declaration gnushogi-1.5pre/gnushogi/eval.c:1464:15: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:2055:18: style: Local variable 'fv1' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/eval.c:323:21: note: Shadowed declaration gnushogi-1.5pre/gnushogi/eval.c:2055:18: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:2551:11: style: Local variable 'c1' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/eval.c:321:14: note: Shadowed declaration gnushogi-1.5pre/gnushogi/eval.c:2551:11: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:2588:38: style: Local variable 'c1' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/eval.c:321:14: note: Shadowed declaration gnushogi-1.5pre/gnushogi/eval.c:2588:38: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:2588:42: style: Local variable 'c2' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/eval.c:321:18: note: Shadowed declaration gnushogi-1.5pre/gnushogi/eval.c:2588:42: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:2818:11: style: Local variable 'stage' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/gnushogi.h:746:14: note: Shadowed declaration gnushogi-1.5pre/gnushogi/eval.c:2818:11: note: Shadow variable gnushogi-1.5pre/gnushogi/eval.c:555:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:565:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:573:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:581:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:591:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:870:17: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:873:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:878:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:912:38: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:916:38: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:926:38: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:933:38: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:947:38: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:951:38: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:960:38: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:987:34: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:995:34: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1006:42: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1010:42: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1025:42: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1030:42: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1153:14: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1184:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1199:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1201:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1390:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1401:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1409:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1415:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1435:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1443:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1447:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1468:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1474:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1478:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1484:18: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1502:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1507:18: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1525:30: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1533:9: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1550:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1555:18: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1568:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1575:9: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1603:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1612:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1616:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1623:9: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1666:16: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1670:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1674:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1684:16: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1690:30: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1692:30: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1696:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1702:24: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1710:9: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1727:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1744:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1760:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1777:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1793:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:1809:5: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2065:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2076:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2217:27: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2311:35: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2325:35: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2330:35: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2339:35: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2643:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2687:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2692:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/eval.c:2698:26: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/genmove.c:129:15: warning: Either the condition '(t)>=0' is redundant or the array 'Pindex[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/genmove.c:124:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/genmove.c:129:15: note: Negative array index gnushogi-1.5pre/gnushogi/genmove.c:130:31: warning: Either the condition '(t)>=0' is redundant or the array 'Pindex[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/genmove.c:124:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/genmove.c:130:31: note: Negative array index gnushogi-1.5pre/gnushogi/genmove.c:133:14: warning: Either the condition '(t)>=0' is redundant or the array 'color[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/genmove.c:124:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/genmove.c:133:14: note: Negative array index gnushogi-1.5pre/gnushogi/genmove.c:1561:45: style: Local variable 'sqking' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/genmove.c:40:14: note: Shadowed declaration gnushogi-1.5pre/gnushogi/genmove.c:1561:45: note: Shadow variable gnushogi-1.5pre/gnushogi/genmove.c:1562:11: style: Local variable 'InCheck' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/genmove.c:41:14: note: Shadowed declaration gnushogi-1.5pre/gnushogi/genmove.c:1562:11: note: Shadow variable gnushogi-1.5pre/gnushogi/genmove.c:673:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/genmove.c:687:22: style: Variable 'ds' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/genmove.c:1394:20: style: Variable 'num' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/init-common.c:151:15: style: Condition 'x>=0' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/init-common.c:149:26: note: Assignment 'x=-1', assigned value is -1 gnushogi-1.5pre/gnushogi/init-common.c:151:15: note: Condition 'x>=0' is always false gnushogi-1.5pre/gnushogi/init.c:226:28: style:inconclusive: Function 'diagonal' argument 1 names different: declaration 'delta' definition 'd'. [funcArgNamesDifferent] gnushogi-1.5pre/gnushogi/gnushogi.h:773:35: note: Function 'diagonal' argument 1 names different: declaration 'delta' definition 'd'. gnushogi-1.5pre/gnushogi/init.c:226:28: note: Function 'diagonal' argument 1 names different: declaration 'delta' definition 'd'. gnushogi-1.5pre/gnushogi/pattern.c:584:33: style:inconclusive: Function 'DisplayPattern' argument 2 names different: declaration 'first_field' definition 'n'. [funcArgNamesDifferent] gnushogi-1.5pre/gnushogi/pattern.h:95:32: note: Function 'DisplayPattern' argument 2 names different: declaration 'first_field' definition 'n'. gnushogi-1.5pre/gnushogi/pattern.c:584:33: note: Function 'DisplayPattern' argument 2 names different: declaration 'first_field' definition 'n'. gnushogi-1.5pre/gnushogi/pattern.c:795:20: style: Variable 'd' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/pattern.c:816:20: style: Variable 'd' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/pattern.c:839:20: style: Variable 'd' is assigned a value that is never used. [unreadVariable] gnushogi-1.5pre/gnushogi/rawdsp.c:243:0: error: #error "Need setvbuf() or setlinebuf() to compile gnushogi!" [preprocessorErrorDirective] gnushogi-1.5pre/gnushogi/search.c:1086:24: warning: Either the condition '(t)>=0' is redundant or the array 'Pindex[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1152:9: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1153:31: note: Calling function 'UpdatePieceList', 2nd argument 't' value is -1 gnushogi-1.5pre/gnushogi/search.c:1086:24: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:1092:19: warning: Either the condition '(t)>=0' is redundant or the array 'board[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1133:9: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1134:31: note: Calling function 'UpdatePieceList', 2nd argument 't' value is -1 gnushogi-1.5pre/gnushogi/search.c:1092:19: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:1291:25: warning: Either the condition 'f>(9*9)' is redundant or the array 'svalue[81]' is accessed at index 81, which is out of bounds. [arrayIndexOutOfBoundsCond] gnushogi-1.5pre/gnushogi/search.c:1275:11: note: Assuming that condition 'f>(9*9)' is not redundant gnushogi-1.5pre/gnushogi/search.c:1291:25: note: Array index out of bounds gnushogi-1.5pre/gnushogi/search.c:1331:20: warning: Either the condition '(t)>=0' is redundant or the array 'Mvboard[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1324:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1331:20: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:1334:14: warning: Either the condition '(t)>=0' is redundant or the array 'color[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1324:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1334:14: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:1337:15: warning: Either the condition '(t)>=0' is redundant or the array 'svalue[81]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1324:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1337:15: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:1341:15: warning: Either the condition '(t)>=0' is redundant or the array 'Pindex[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1324:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1341:15: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:1342:31: warning: Either the condition '(t)>=0' is redundant or the array 'Pindex[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1324:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1342:31: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:1491:20: warning: Either the condition '(t)>=0' is redundant or the array 'Mvboard[0]' is accessed at index -1, which is out of bounds. [negativeIndex] gnushogi-1.5pre/gnushogi/search.c:1490:13: note: Assuming that condition '(t)>=0' is not redundant gnushogi-1.5pre/gnushogi/search.c:1491:20: note: Negative array index gnushogi-1.5pre/gnushogi/search.c:559:29: style: Condition 'flag.back' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/search.c:547:21: note: Assuming condition 'flag.back' is false gnushogi-1.5pre/gnushogi/search.c:559:29: note: Condition 'flag.back' is always false gnushogi-1.5pre/gnushogi/search.c:574:26: style: Condition 'flag.back' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/search.c:547:21: note: Assuming condition 'flag.back' is false gnushogi-1.5pre/gnushogi/search.c:574:26: note: Condition 'flag.back' is always false gnushogi-1.5pre/gnushogi/search.c:769:10: style: Redundant initialization for 'best'. The initialized value is overwritten before it is read. [redundantInitialization] gnushogi-1.5pre/gnushogi/search.c:527:16: note: best is initialized gnushogi-1.5pre/gnushogi/search.c:769:10: note: best is overwritten gnushogi-1.5pre/gnushogi/search.c:1403:19: style: Parameter 'tempst' can be declared as pointer to const [constParameter] gnushogi-1.5pre/gnushogi/search.c:1402:19: style: Parameter 'tempsf' can be declared as pointer to const [constParameter] gnushogi-1.5pre/gnushogi/search.c:1400:19: style: Parameter 'tempb' can be declared as pointer to const [constParameter] gnushogi-1.5pre/gnushogi/sizetest.c:247:5: portability: %lu in format string (no. 2) requires 'unsigned long' but the argument type is 'size_t {aka unsigned long}'. [invalidPrintfArgType_uint] gnushogi-1.5pre/gnushogi/tcontrl.c:175:29: style: Condition 'TCcount<0' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/tcontrl.c:173:39: note: Assignment 'TCcount=10-10', assigned value is 0 gnushogi-1.5pre/gnushogi/tcontrl.c:175:29: note: Condition 'TCcount<0' is always false gnushogi-1.5pre/gnushogi/tcontrl.c:187:25: style: Condition 'TCcount<0' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/tcontrl.c:185:35: note: Assignment 'TCcount=10-10', assigned value is 0 gnushogi-1.5pre/gnushogi/tcontrl.c:187:25: note: Condition 'TCcount<0' is always false gnushogi-1.5pre/gnushogi/tcontrl.c:197:25: style: Condition 'TCcount<0' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/tcontrl.c:195:35: note: Assignment 'TCcount=10-10', assigned value is 0 gnushogi-1.5pre/gnushogi/tcontrl.c:197:25: note: Condition 'TCcount<0' is always false gnushogi-1.5pre/gnushogi/util.c:512:5: error: Expression 'pdst[--i]=psrc[i]' depends on order of evaluation of side effects [unknownEvaluationOrder] gnushogi-1.5pre/gnushogi/util.c:556:9: error: Expression 'pdst[--i]=psrc[i]' depends on order of evaluation of side effects [unknownEvaluationOrder] gnushogi-1.5pre/gnushogi/commondsp.c:173:37: style: Condition 't!=0' is always false [knownConditionTrueFalse] gnushogi-1.5pre/gnushogi/commondsp.c:173:25: note: Assuming that condition 'f!=0' is not redundant gnushogi-1.5pre/gnushogi/commondsp.c:173:12: note: Assuming that condition 'f==t' is not redundant gnushogi-1.5pre/gnushogi/commondsp.c:173:37: note: Condition 't!=0' is always false gnushogi-1.5pre/gnushogi/commondsp.c:1603:13: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf] gnushogi-1.5pre/gnushogi/commondsp.c:602:17: style: Local variable 'side' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/commondsp.c:452:11: note: Shadowed declaration gnushogi-1.5pre/gnushogi/commondsp.c:602:17: note: Shadow variable gnushogi-1.5pre/gnushogi/commondsp.c:627:23: style: Local variable 'i' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/commondsp.c:450:12: note: Shadowed declaration gnushogi-1.5pre/gnushogi/commondsp.c:627:23: note: Shadow variable gnushogi-1.5pre/gnushogi/commondsp.c:1926:39: style: Local variable 'PrVar' shadows outer variable [shadowVariable] gnushogi-1.5pre/gnushogi/gnushogi.h:768:23: note: Shadowed declaration gnushogi-1.5pre/gnushogi/commondsp.c:1926:39: note: Shadow variable gnushogi-1.5pre/gnushogi/commondsp.c:604:18: style: Variable 'side' is assigned a value that is never used. [unreadVariable] diff: head gnushogi-1.5pre/gnushogi/search.c:1400:19: style: Parameter 'tempb' can be declared as pointer to const [constParameter] 2.8 gnushogi-1.5pre/gnushogi/search.c:1400:19: style: Parameter 'tempb' can be declared with const [constParameter] head gnushogi-1.5pre/gnushogi/search.c:1402:19: style: Parameter 'tempsf' can be declared as pointer to const [constParameter] 2.8 gnushogi-1.5pre/gnushogi/search.c:1402:19: style: Parameter 'tempsf' can be declared with const [constParameter] head gnushogi-1.5pre/gnushogi/search.c:1403:19: style: Parameter 'tempst' can be declared as pointer to const [constParameter] 2.8 gnushogi-1.5pre/gnushogi/search.c:1403:19: style: Parameter 'tempst' can be declared with const [constParameter] DONE