Fix compile time warnings for unused stuff in release build