Fixed clang build warnings when -Wattributes is defined
Fixed formating build warnings (-Wformat)