fix some warnings caused by '-pedantic' compiler flag

- use __typedef__ instead of typedef
- semicolon at the end of the function definition

norefs

Change-Id: Iae8aa04d02fdfa3f808367b339da6f4d9d529392