The issues below were flagged as a dead store, but I think they might indicate
another issue. If is_locked acts as a lock in a multithreaded program, then they
should probably be an atomic.
libtool: compile: /usr/local/bin/scan-build/ccc-analyzer -DHAVE_CONFIG_H -I.
-I.. -I../src -I../src -I/usr/local/include -g3 -O1 -fvisibility=hidden -Wall
-MT primegen.lo -MD -MP -MF .deps/primegen.Tpo -c primegen.c -o primegen.o
primegen.c:491:11: warning: Value stored to 'is_locked' is never read
is_locked = 0; ^ ~
primegen.c:530:11: warning: Value stored to 'is_locked' is never read
is_locked = 0; ^ ~
primegen.c:708:7: warning: Value stored to 'is_locked' is never read
is_locked = 0; ^ ~
3 warnings generated.