Skip to content

Commit 6d721c7

Browse files
committed
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)
1 parent de318c5 commit 6d721c7

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/evalfunc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6859,10 +6859,8 @@ f_len(typval_T *argvars, typval_T *rettv)
68596859
}
68606860
}
68616861

6862-
static void libcall_common(typval_T *argvars, typval_T *rettv, int type);
6863-
68646862
static void
6865-
libcall_common(typval_T *argvars, typval_T *rettv, int type)
6863+
libcall_common(typval_T *argvars UNUSED, typval_T *rettv, int type)
68666864
{
68676865
#ifdef FEAT_LIBCALL
68686866
char_u *string_in;

src/os_unix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6918,7 +6918,7 @@ mch_libcall(
69186918
if (argstring != NULL)
69196919
{
69206920
# if defined(USE_DLOPEN)
6921-
ProcAdd = (STRPROCSTR)dlsym(hinstLib, (const char *)funcname);
6921+
*(void **)(&ProcAdd) = dlsym(hinstLib, (const char *)funcname);
69226922
dlerr = (char *)dlerror();
69236923
# else
69246924
if (shl_findsym(&hinstLib, (const char *)funcname,
@@ -6940,7 +6940,7 @@ mch_libcall(
69406940
else
69416941
{
69426942
# if defined(USE_DLOPEN)
6943-
ProcAddI = (INTPROCSTR)dlsym(hinstLib, (const char *)funcname);
6943+
*(void **)(&ProcAddI) = dlsym(hinstLib, (const char *)funcname);
69446944
dlerr = (char *)dlerror();
69456945
# else
69466946
if (shl_findsym(&hinstLib, (const char *)funcname,

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
199,
767769
/**/
768770
198,
769771
/**/

0 commit comments

Comments
 (0)