fix all compilation warnings and one clang compilation error
added d0 wait end sync feature
Merge pull request #34 from mbehr1/fix_all_warnings

Fix all warnings and added D0 wait end sync feature