Fix deprecated function warning

The `GetVersionEx` function  has been deprecated.

Since it doesn't make much sense here, it has been deleted.
This commit is contained in:
evpobr 2021-02-17 13:44:15 +05:00
parent 1f324b7998
commit 610c6392cb

View File

@ -29,10 +29,6 @@
#include "sf_unistd.h"
#endif
#if OS_IS_WIN32
#include <windows.h>
#endif
#include <sndfile.h>
#include "utils.h"
@ -213,19 +209,10 @@ error_close_test (void)
if (sf_close (sndfile) == 0)
{
#if OS_IS_WIN32
OSVERSIONINFOEX osvi ;
memset (&osvi, 0, sizeof (OSVERSIONINFOEX)) ;
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX) ;
if (GetVersionEx ((OSVERSIONINFO *) &osvi))
{ printf ("\n\nLine %d : sf_close should not have returned zero.\n", __LINE__) ;
printf ("\nHowever, this is a known bug in version %d.%d of windows so we'll ignore it.\n\n",
(int) osvi.dwMajorVersion, (int) osvi.dwMinorVersion) ;
} ;
#else
printf ("\n\nLine %d : sf_close should not have returned zero.\n", __LINE__) ;
#if OS_IS_WIN32
printf ("\nHowever, this is a known bug on windows platform so we'll ignore it.\n\n") ;
#else
exit (1) ;
#endif
} ;