]> git.sesse.net Git - stockfish/commit
Run PVS-STUDIO analyzer
authorMarco Costalba <mcostalba@gmail.com>
Sun, 27 Sep 2015 08:53:39 +0000 (10:53 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 5 Oct 2015 07:13:33 +0000 (09:13 +0200)
commitca3835857435590865fd41aac9bf4c1cda76dfc3
tree9982827eea02add15c92acbc7f7c8c80b89fdba2
parent83e19fbed539fc05626d82afefde730bdcb344ab
Run PVS-STUDIO analyzer

Fix issues after a run of PVS-STUDIO analyzer.
Mainly false positives but warnings are anyhow
useful to point out not very readable code.

Noteworthy is the memset() one, where PVS prefers ss-2
instead of stack. This is because memeset() could
be optimized away by the compiler when using 'stack',
due to stack being a local variable no more used after
memset. This should normally not happen, but when
it happens it leads to very sublte and difficult
to find bug, so better to be safe than sorry.

No functional change.
src/main.cpp
src/movegen.cpp
src/movepick.h
src/search.cpp
src/uci.cpp