The best and easy way without using scripts, hacks and much more.
Just go to Find And Replace and press alt/option + space and press space button in the replace bar and then click on replace all.
It will replace the whitespaces with normal spaces and the warning/ error will be gone !!