tpaviot/oce — pull request #472 by thatcadguy (2014-02-04 18:45:51+00:00)
Title: Fix flags in FormatMessage, Wvarargs warning fix

MinGW has been giving a warning about 'err is not last named argument' for the line '''va_start ( arg_ptr, err );'''; C standard says that va_start should use the last named argument with '''va_start'''. When going to fix this, I noticed the wrong flags have been supplied to FormatMessage, the '''FORMAT_MESSAGE_ARGUMENT_ARRAY''' flag is not supposed to be used with a '''va_list''' structure like it was in the code. After looking at the other places in OCE that use '''_osd_wnt_set_error''' and reading that using '''FORMAT_MESSAGE_FROM_SYSTEM''' shouldn't really be used with the optional argument list unless you're sure of the exact error and what that error message requires in terms of optional inserts, I figured I'd just neuter this function and leave out the optional arguments entirely.