Prevent warnings when compiling with -Wextra

Mostly changed signed/unsigned comparisons, also removed unused
arguments from functions.
Merge branch 'upstream' of github.com:ComputerScienceHouse/bingehack4 into upstream