fix most warnings with -pedantic

mostly unused parameters, fix some comments in .c files. (// isn't valid in iso c90)