Linux portability fixes, warnings
suppress unused function warning
extra warnings
fix parameter not used
fix const qualifier on return type
some more warnings removed
more warnings fixed