aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32fns.c
diff options
context:
space:
mode:
authorAndy Moreton2015-07-28 16:37:31 +0300
committerEli Zaretskii2015-07-28 16:37:31 +0300
commit87b8992ca357e180bf87f4a8df3ef58b7de89695 (patch)
tree0f6b9cea989b76409d0f5bfa7a4a82cd7b00aeab /src/w32fns.c
parent1216f7332d18248017835b1b01ded6345b51b976 (diff)
downloademacs-87b8992ca357e180bf87f4a8df3ef58b7de89695.tar.gz
emacs-87b8992ca357e180bf87f4a8df3ef58b7de89695.zip
Pacify compilation -Wincompatible-pointer-types warnings
* src/w32proc.c (Fw32_get_codepage_charset): Avoid compilation warning. (CompareStringW_Proc): New typedef. (w32_compare_strings): Use it, to pacify compiler warnings under "-Wincompatible-pointer-types". * src/w32fns.c (GetDiskFreeSpaceExW_Proc) (GetDiskFreeSpaceExA_Proc): New typedefs. (Ffile_system_info): Use them, to pacify compiler warnings under "-Wincompatible-pointer-types". Copyright-paperwork-exempt: yes
Diffstat (limited to 'src/w32fns.c')
-rw-r--r--src/w32fns.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index abfa315e2a9..499450f4c92 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7799,6 +7799,11 @@ The following %-sequences are provided:
7799 7799
7800 7800
7801#ifdef WINDOWSNT 7801#ifdef WINDOWSNT
7802typedef BOOL (WINAPI *GetDiskFreeSpaceExW_Proc)
7803 (LPCWSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
7804typedef BOOL (WINAPI *GetDiskFreeSpaceExA_Proc)
7805 (LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
7806
7802DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, 7807DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0,
7803 doc: /* Return storage information about the file system FILENAME is on. 7808 doc: /* Return storage information about the file system FILENAME is on.
7804Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total 7809Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total
@@ -7822,12 +7827,10 @@ If the underlying system call fails, value is nil. */)
7822 added rather late on. */ 7827 added rather late on. */
7823 { 7828 {
7824 HMODULE hKernel = GetModuleHandle ("kernel32"); 7829 HMODULE hKernel = GetModuleHandle ("kernel32");
7825 BOOL (WINAPI *pfn_GetDiskFreeSpaceExW) 7830 GetDiskFreeSpaceExW_Proc pfn_GetDiskFreeSpaceExW =
7826 (wchar_t *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) 7831 (GetDiskFreeSpaceExW_Proc) GetProcAddress (hKernel, "GetDiskFreeSpaceExW");
7827 = GetProcAddress (hKernel, "GetDiskFreeSpaceExW"); 7832 GetDiskFreeSpaceExA_Proc pfn_GetDiskFreeSpaceExA =
7828 BOOL (WINAPI *pfn_GetDiskFreeSpaceExA) 7833 (GetDiskFreeSpaceExA_Proc) GetProcAddress (hKernel, "GetDiskFreeSpaceExA");
7829 (char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER)
7830 = GetProcAddress (hKernel, "GetDiskFreeSpaceExA");
7831 bool have_pfn_GetDiskFreeSpaceEx = 7834 bool have_pfn_GetDiskFreeSpaceEx =
7832 ((w32_unicode_filenames && pfn_GetDiskFreeSpaceExW) 7835 ((w32_unicode_filenames && pfn_GetDiskFreeSpaceExW)
7833 || (!w32_unicode_filenames && pfn_GetDiskFreeSpaceExA)); 7836 || (!w32_unicode_filenames && pfn_GetDiskFreeSpaceExA));