Mercurial > vim
comparison src/os_unix.c @ 10620:2198b53b9ffe v8.0.0199
patch 8.0.0199: compiler warnings for libcall
commit https://github.com/vim/vim/commit/6d721c7e10251ad8c89a461eed99d8cf2659c1df
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 17 16:56:28 2017 +0100
patch 8.0.0199: compiler warnings for libcall
Problem: Warning for an unused parameter when the libcall feature is
disabled. Warning for a function type cast when compiling with
-pedantic.
Solution: Add UNUSED. Use a different type cast. (Damien Molinier)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 17 Jan 2017 17:00:05 +0100 |
parents | 56cb9538386c |
children | fb2bcfa6a8de |
comparison
equal
deleted
inserted
replaced
10619:3cc3825f1f53 | 10620:2198b53b9ffe |
---|---|
6916 retval_int = 0; | 6916 retval_int = 0; |
6917 | 6917 |
6918 if (argstring != NULL) | 6918 if (argstring != NULL) |
6919 { | 6919 { |
6920 # if defined(USE_DLOPEN) | 6920 # if defined(USE_DLOPEN) |
6921 ProcAdd = (STRPROCSTR)dlsym(hinstLib, (const char *)funcname); | 6921 *(void **)(&ProcAdd) = dlsym(hinstLib, (const char *)funcname); |
6922 dlerr = (char *)dlerror(); | 6922 dlerr = (char *)dlerror(); |
6923 # else | 6923 # else |
6924 if (shl_findsym(&hinstLib, (const char *)funcname, | 6924 if (shl_findsym(&hinstLib, (const char *)funcname, |
6925 TYPE_PROCEDURE, (void *)&ProcAdd) < 0) | 6925 TYPE_PROCEDURE, (void *)&ProcAdd) < 0) |
6926 ProcAdd = NULL; | 6926 ProcAdd = NULL; |
6938 } | 6938 } |
6939 } | 6939 } |
6940 else | 6940 else |
6941 { | 6941 { |
6942 # if defined(USE_DLOPEN) | 6942 # if defined(USE_DLOPEN) |
6943 ProcAddI = (INTPROCSTR)dlsym(hinstLib, (const char *)funcname); | 6943 *(void **)(&ProcAddI) = dlsym(hinstLib, (const char *)funcname); |
6944 dlerr = (char *)dlerror(); | 6944 dlerr = (char *)dlerror(); |
6945 # else | 6945 # else |
6946 if (shl_findsym(&hinstLib, (const char *)funcname, | 6946 if (shl_findsym(&hinstLib, (const char *)funcname, |
6947 TYPE_PROCEDURE, (void *)&ProcAddI) < 0) | 6947 TYPE_PROCEDURE, (void *)&ProcAddI) < 0) |
6948 ProcAddI = NULL; | 6948 ProcAddI = NULL; |