Merge timoore/linux-hacks
Fix some unused vars and whitespaces.
Remove some more compilation warnings.