Fixed compile warnings from GCC
No comiple warnings (except for syncfs) and compiles for OpenWRT
Fixed some endianess issues