Use MAX().
Remove write-only variable.
Fix typos in comments.
Remove superfluous parentheses.
Remove redundant mode equality test before calling tarval_convert_to().
Declare the variables for the macro foreach_tgt() in the macro.