sws: fix a huge amount of incompatible pointer type arguments warnings.