some minor c-code changes, all Java warnings removed