Previous fix didn't compile when GCC is treating warnings as errors. Warnings are not nice anyway so squash these and remove the temporary variables (slight loss of clarity).