add pedantic flag, fix variable in sunos