Add driver.c for test. Correct all bug/warning.