Redo commit 412b6d685634c86200ce2b801916b9d33e9e1f28

I apparently had this file open in an editor and thus accidentally
removed Hakan's changes.
Fix compiler warnings

Always use if () { ... } even if ... is just one statement.