Skip to content

Commit bd67aac

Browse files
committed
patch 8.1.2064: MS-Windows: compiler warnings for unused arguments
Problem: MS-Windows: compiler warnings for unused arguments. Solution: Add UNUSED. (Yegappan Lakshmanan, closes #4963)
1 parent 1e82a78 commit bd67aac

13 files changed

Lines changed: 24 additions & 22 deletions

File tree

src/channel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ messageFromServerGtk2(gpointer clientData,
577577
# endif
578578

579579
static void
580-
channel_gui_register_one(channel_T *channel, ch_part_T part)
580+
channel_gui_register_one(channel_T *channel, ch_part_T part UNUSED)
581581
{
582582
if (!CH_HAS_GUI)
583583
return;
@@ -661,7 +661,7 @@ channel_gui_register_all(void)
661661
}
662662

663663
static void
664-
channel_gui_unregister_one(channel_T *channel, ch_part_T part)
664+
channel_gui_unregister_one(channel_T *channel UNUSED, ch_part_T part UNUSED)
665665
{
666666
# ifdef FEAT_GUI_X11
667667
if (channel->ch_part[part].ch_inputHandler != (XtInputId)NULL)
@@ -5800,7 +5800,7 @@ job_check_ended(void)
58005800
job_T *
58015801
job_start(
58025802
typval_T *argvars,
5803-
char **argv_arg,
5803+
char **argv_arg UNUSED,
58045804
jobopt_T *opt_arg,
58055805
int is_terminal UNUSED)
58065806
{

src/ex_docmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7335,7 +7335,7 @@ close_redir(void)
73357335

73367336
#if (defined(FEAT_SESSION) || defined(FEAT_EVAL)) || defined(PROTO)
73377337
int
7338-
vim_mkdir_emsg(char_u *name, int prot)
7338+
vim_mkdir_emsg(char_u *name, int prot UNUSED)
73397339
{
73407340
if (vim_mkdir(name, prot) != 0)
73417341
{

src/ex_getln.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3754,7 +3754,7 @@ ccheck_abbr(int c)
37543754
* Returns the result in allocated memory.
37553755
*/
37563756
char_u *
3757-
vim_strsave_fnameescape(char_u *fname, int shell)
3757+
vim_strsave_fnameescape(char_u *fname, int shell UNUSED)
37583758
{
37593759
char_u *p;
37603760
#ifdef BACKSLASH_IN_FILENAME

src/fileio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2981,7 +2981,7 @@ set_file_time(
29812981
int
29822982
check_file_readonly(
29832983
char_u *fname, /* full path to file */
2984-
int perm) /* known permissions on file */
2984+
int perm UNUSED) /* known permissions on file */
29852985
{
29862986
#ifndef USE_MCH_ACCESS
29872987
int fd = 0;

src/gui_w32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6720,7 +6720,7 @@ gui_mch_dialog(
67206720
char_u *buttons,
67216721
int dfltbutton,
67226722
char_u *textfield,
6723-
int ex_cmd)
6723+
int ex_cmd UNUSED)
67246724
{
67256725
WORD *p, *pdlgtemplate, *pnumitems;
67266726
DWORD *dwp;
@@ -8517,7 +8517,7 @@ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
85178517

85188518
BalloonEval *
85198519
gui_mch_create_beval_area(
8520-
void *target, /* ignored, always use s_textArea */
8520+
void *target UNUSED, /* ignored, always use s_textArea */
85218521
char_u *mesg,
85228522
void (*mesgCB)(BalloonEval *, int),
85238523
void *clientData)

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3658,7 +3658,7 @@ static struct timeval prev_timeval;
36583658
* Windows doesn't have gettimeofday(), although it does have struct timeval.
36593659
*/
36603660
static int
3661-
gettimeofday(struct timeval *tv, char *dummy)
3661+
gettimeofday(struct timeval *tv, char *dummy UNUSED)
36623662
{
36633663
long t = clock();
36643664
tv->tv_sec = t / CLOCKS_PER_SEC;

src/memline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ static char tz_cache[64];
21012101
struct tm *
21022102
vim_localtime(
21032103
const time_t *timep, // timestamp for local representation
2104-
struct tm *result) // pointer to caller return buffer
2104+
struct tm *result UNUSED) // pointer to caller return buffer
21052105
{
21062106
#ifdef HAVE_LOCALTIME_R
21072107
# ifdef HAVE_TZSET

src/os_mswin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ mch_input_isatty(void)
272272
void
273273
mch_settitle(
274274
char_u *title,
275-
char_u *icon)
275+
char_u *icon UNUSED)
276276
{
277277
# ifdef FEAT_GUI_MSWIN
278278
# ifdef VIMDLL
@@ -1164,7 +1164,7 @@ AbortProc(HDC hdcPrn UNUSED, int iCode UNUSED)
11641164
PrintHookProc(
11651165
HWND hDlg, // handle to dialog box
11661166
UINT uiMsg, // message identifier
1167-
WPARAM wParam, // message parameter
1167+
WPARAM wParam UNUSED, // message parameter
11681168
LPARAM lParam // message parameter
11691169
)
11701170
{

src/os_win32.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ read_console_input(
365365
peek_console_input(
366366
HANDLE hInput,
367367
INPUT_RECORD *lpBuffer,
368-
DWORD nLength,
368+
DWORD nLength UNUSED,
369369
LPDWORD lpEvents)
370370
{
371371
return read_console_input(hInput, lpBuffer, -1, lpEvents);
@@ -1006,7 +1006,7 @@ decode_key_event(
10061006
WCHAR *pch,
10071007
WCHAR *pch2,
10081008
int *pmodifiers,
1009-
BOOL fDoPost)
1009+
BOOL fDoPost UNUSED)
10101010
{
10111011
int i;
10121012
const int nModifs = pker->dwControlKeyState & (SHIFT | ALT | CTRL);
@@ -4486,7 +4486,7 @@ mch_system_g(char *cmd, int options)
44864486

44874487
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
44884488
static int
4489-
mch_system_c(char *cmd, int options)
4489+
mch_system_c(char *cmd, int options UNUSED)
44904490
{
44914491
int ret;
44924492
WCHAR *wcmd;
@@ -6456,7 +6456,7 @@ mch_remove(char_u *name)
64566456
* Check for an "interrupt signal": CTRL-break or CTRL-C.
64576457
*/
64586458
void
6459-
mch_breakcheck(int force)
6459+
mch_breakcheck(int force UNUSED)
64606460
{
64616461
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
64626462
# ifdef VIMDLL
@@ -7218,7 +7218,7 @@ fix_arg_enc(void)
72187218
}
72197219

72207220
int
7221-
mch_setenv(char *var, char *value, int x)
7221+
mch_setenv(char *var, char *value, int x UNUSED)
72227222
{
72237223
char_u *envbuf;
72247224
WCHAR *p;

src/terminal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ free_unused_terminals()
957957
* possible to do "1,5term vim -".
958958
*/
959959
static ch_part_T
960-
get_tty_part(term_T *term)
960+
get_tty_part(term_T *term UNUSED)
961961
{
962962
#ifdef UNIX
963963
ch_part_T parts[3] = {PART_IN, PART_OUT, PART_ERR};
@@ -5787,7 +5787,7 @@ dyn_conpty_init(int verbose)
57875787
conpty_term_and_job_init(
57885788
term_T *term,
57895789
typval_T *argvar,
5790-
char **argv,
5790+
char **argv UNUSED,
57915791
jobopt_T *opt,
57925792
jobopt_T *orig_opt)
57935793
{
@@ -6139,7 +6139,7 @@ dyn_winpty_init(int verbose)
61396139
winpty_term_and_job_init(
61406140
term_T *term,
61416141
typval_T *argvar,
6142-
char **argv,
6142+
char **argv UNUSED,
61436143
jobopt_T *opt,
61446144
jobopt_T *orig_opt)
61456145
{

0 commit comments

Comments
 (0)