Skip to content

Commit

Permalink
Merge pull request #472 from tpaviot/review/_osd_wnt_set_error-fix
Browse files Browse the repository at this point in the history
Fix flags in FormatMessage, Wvarargs warning fix
  • Loading branch information
dbarbier committed Feb 9, 2014
2 parents 535646b + 6f5853b commit dc6ff44
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/OSD/OSD_FileNode.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -945,16 +945,13 @@ void _osd_wnt_set_error ( OSD_Error& err, OSD_WhoAmI who, ... ) {

DWORD errCode;
Standard_Character buffer[ 2048 ];
va_list arg_ptr;

va_start ( arg_ptr, err );

errCode = GetLastError ();

if ( !FormatMessage (
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY,
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
0, errCode, MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ),
buffer, 2048, &arg_ptr
buffer, 2048, NULL
)
) {

Expand All @@ -965,8 +962,6 @@ void _osd_wnt_set_error ( OSD_Error& err, OSD_WhoAmI who, ... ) {

err.SetValue ( errCode, who, buffer );

va_end ( arg_ptr );

} // end _set_error


Expand Down

0 comments on commit dc6ff44

Please sign in to comment.