unix, windows: remove unused variables
test: fix signed/unsigned comparison warnings