From f7b093649656efc2cbb0aaf4a70f0ec63f8c382a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 15 Mar 2008 20:02:00 +0000 Subject: [PATCH] Eliminate compiler warning in vss_generic.cpp git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6613 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/win32/filed/vss_generic.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/bacula/src/win32/filed/vss_generic.cpp b/bacula/src/win32/filed/vss_generic.cpp index 6eec792eb8..96ebcb4dde 100644 --- a/bacula/src/win32/filed/vss_generic.cpp +++ b/bacula/src/win32/filed/vss_generic.cpp @@ -368,17 +368,15 @@ BOOL VSSClientGeneric::WaitAndCheckForAsyncOperation(IVssAsync* pAsync) if(hrReturned != VSS_S_ASYNC_FINISHED) { wchar_t *pwszBuffer = NULL; /* I don't see the usefulness of the following -- KES */ - DWORD dwRet = ::FormatMessageW( - FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, hrReturned, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPWSTR)&pwszBuffer, 0, NULL); - -// if (dwRet != 0) { - LocalFree(pwszBuffer); -// } + FormatMessageW( + FORMAT_MESSAGE_ALLOCATE_BUFFER + | FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, hrReturned, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPWSTR)&pwszBuffer, 0, NULL); + + LocalFree(pwszBuffer); errno = b_errno_win32; } #endif -- 2.39.5