Hi Bram!
2016-1-31(Sun) 5:30:20 UTC+9 Bram Moolenaar:
> Patch 7.4.1215
> Problem: Using old style function declarations.
> Solution: Change to new style function declarations. (script by Hirohito
> Higashi)
> Files: src/version.c, src/winclip.c, src/window.c, src/workshop.c,
> src/xpm_w32.c, runtime/doc/doctags.c,
> runtime/tools/xcmdsrv_client.c, src/po/sjiscorr.c, src/xxd/xxd.c
[...]
Perhaps, This is complete when you are applying the attached patch.
Cheers for good work ;-)
--
Best regards,
Hirohito Higashi (a.k.a h_east)
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/tools/blink.c b/runtime/tools/blink.c
index 1ffd848..40c2aac 100644
--- a/runtime/tools/blink.c
+++ b/runtime/tools/blink.c
@@ -7,7 +7,7 @@
#include <stdio.h>
-main()
+int main(void)
{
while (1)
{
@@ -18,4 +18,5 @@ main()
fflush(stdout);
usleep(250000); /* off time */
}
+ return 0;
}
diff --git a/src/auto/configure b/src/auto/configure
index 967a568..64a2946 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -3350,9 +3350,7 @@ struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
+static char *e (char **p, int i)
{
return p[i];
}
diff --git a/src/eval.c b/src/eval.c
index 7679251..23674c0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -5999,7 +5999,7 @@ list_free(
* It is not initialized, don't forget to set v_lock.
*/
listitem_T *
-listitem_alloc()
+listitem_alloc(void)
{
return (listitem_T *)alloc(sizeof(listitem_T));
}
@@ -10903,10 +10903,10 @@ f_filewritable(typval_T *argvars, typval_T *rettv)
static void findfilendir(typval_T *argvars, typval_T *rettv, int find_what);
static void
-findfilendir(argvars, rettv, find_what)
- typval_T *argvars UNUSED;
- typval_T *rettv;
- int find_what UNUSED;
+findfilendir(
+ typval_T *argvars UNUSED,
+ typval_T *rettv,
+ int find_what UNUSED)
{
#ifdef FEAT_SEARCHPATH
char_u *fname;
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index c1adea4..17babd0 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3633,10 +3633,10 @@ fgets_cr(char *s, int n, FILE *stream)
* At least CodeWarrior 9 needed this code.
*/
char *
-fgets_cr(s, n, stream)
- char *s;
- int n;
- FILE *stream;
+fgets_cr(
+ char *s,
+ int n,
+ FILE *stream)
{
int c = 0;
int char_read = 0;
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 9a49f9f..bb97eb4 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -5649,7 +5649,7 @@ set_cmdline_pos(
* Returns NUL when something is wrong.
*/
int
-get_cmdline_type()
+get_cmdline_type(void)
{
struct cmdline_info *p = get_ccline_ptr();
diff --git a/src/fileio.c b/src/fileio.c
index 6ae1572..ecec757 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -9987,9 +9987,9 @@ theend:
* "curbuf" and "curwin" to match "buf".
*/
void
-aucmd_prepbuf(aco, buf)
- aco_save_T *aco; /* structure to save values in */
- buf_T *buf; /* new curbuf */
+aucmd_prepbuf(
+ aco_save_T *aco, /* structure to save values in */
+ buf_T *buf) /* new curbuf */
{
aco->save_curbuf = curbuf;
--curbuf->b_nwindows;
@@ -10003,8 +10003,8 @@ aucmd_prepbuf(aco, buf)
* This is the non-autocommand version.
*/
void
-aucmd_restbuf(aco)
- aco_save_T *aco; /* structure holding saved values */
+aucmd_restbuf(
+ aco_save_T *aco) /* structure holding saved values */
{
--curbuf->b_nwindows;
curbuf = aco->save_curbuf;
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 6a0e0a3..05d8e30 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -2292,7 +2292,7 @@ im_set_active(int active)
* Get IM status. When IM is on, return not 0. Else return 0.
*/
int
-im_get_status()
+im_get_status(void)
{
return global_ime_get_status();
}
diff --git a/src/gui_x11.c b/src/gui_x11.c
index e6e6f61..5a0fe8d 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -2234,8 +2234,7 @@ fontset_height2(XFontSet fs)
/* NOT USED YET
static int
-fontset_descent(fs)
- XFontSet fs;
+fontset_descent(XFontSet fs)
{
XFontSetExtents *extents;
diff --git a/src/if_perl.xs b/src/if_perl.xs
index f37f416..2b610b6 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -631,8 +631,8 @@ perl_runtime_link_init(char *libname, int verbose)
* There were no DLL loaded, return FALSE.
*/
int
-perl_enabled(verbose)
- int verbose;
+perl_enabled(
+ int verbose)
{
return perl_runtime_link_init((char *)p_perldll, verbose) == OK;
}
@@ -644,7 +644,7 @@ perl_enabled(verbose)
* there's nothing to actually parse.
*/
static void
-perl_init()
+perl_init(void)
{
char *bootargs[] = { "VI", NULL };
int argc = 3;
@@ -670,7 +670,7 @@ perl_init()
* perl_end(): clean up after ourselves
*/
void
-perl_end()
+perl_end(void)
{
if (perl_interp)
{
@@ -696,9 +696,9 @@ perl_end()
* split at '\n' first though.
*/
void
-msg_split(s, attr)
- char_u *s;
- int attr; /* highlighting attributes */
+msg_split(
+ char_u *s,
+ int attr) /* highlighting attributes */
{
char *next;
char *token = (char *)s;
@@ -719,10 +719,10 @@ msg_split(s, attr)
* work properly.
*/
char_u *
-eval_to_string(arg, nextcmd, dolist)
- char_u *arg UNUSED;
- char_u **nextcmd UNUSED;
- int dolist UNUSED;
+eval_to_string(
+ char_u *arg UNUSED,
+ char_u **nextcmd UNUSED,
+ int dolist UNUSED)
{
return NULL;
}
@@ -740,9 +740,9 @@ eval_to_string(arg, nextcmd, dolist)
*/
static SV *
-newWINrv(rv, ptr)
- SV *rv;
- win_T *ptr;
+newWINrv(
+ SV *rv,
+ win_T *ptr)
{
sv_upgrade(rv, SVt_RV);
if (ptr->w_perl_private == NULL)
@@ -758,9 +758,9 @@ newWINrv(rv, ptr)
}
static SV *
-newBUFrv(rv, ptr)
- SV *rv;
- buf_T *ptr;
+newBUFrv(
+ SV *rv,
+ buf_T *ptr)
{
sv_upgrade(rv, SVt_RV);
if (ptr->b_perl_private == NULL)
@@ -780,8 +780,8 @@ newBUFrv(rv, ptr)
* Remove all references to the window to be destroyed
*/
void
-perl_win_free(wp)
- win_T *wp;
+perl_win_free(
+ win_T *wp)
{
if (wp->w_perl_private)
sv_setiv((SV *)wp->w_perl_private, 0);
@@ -789,8 +789,8 @@ perl_win_free(wp)
}
void
-perl_buf_free(bp)
- buf_T *bp;
+perl_buf_free(
+ buf_T *bp)
{
if (bp->b_perl_private)
sv_setiv((SV *)bp->b_perl_private, 0);
@@ -834,7 +834,7 @@ struct ufuncs cb_funcs = { cur_val, 0, 1 };
* Make the magical main::curwin and main::curbuf variables
*/
static void
-VIM_init()
+VIM_init(void)
{
static char cw[] = "main::curwin";
static char cb[] = "main::curbuf";
@@ -866,8 +866,8 @@ static char *e_noperl = N_("Sorry, this command is disabled: the Perl library co
* ":perl"
*/
void
-ex_perl(eap)
- exarg_T *eap;
+ex_perl(
+ exarg_T *eap)
{
char *err;
char *script;
@@ -947,8 +947,8 @@ ex_perl(eap)
}
static int
-replace_line(line, end)
- linenr_T *line, *end;
+replace_line(
+ linenr_T *line, *end)
{
char *str;
@@ -989,8 +989,8 @@ ref_map_free(void)
}
static struct ref_map_S *
-ref_map_find_SV(sv)
- SV *const sv;
+ref_map_find_SV(
+ SV *const sv)
{
struct ref_map_S *refs = ref_map;
int count = 350;
@@ -1016,9 +1016,9 @@ ref_map_find_SV(sv)
}
static int
-perl_to_vim(sv, rettv)
- SV *sv;
- typval_T *rettv;
+perl_to_vim(
+ SV *sv,
+ typval_T *rettv)
{
if (SvROK(sv))
sv = SvRV(sv);
@@ -1171,9 +1171,9 @@ perl_to_vim(sv, rettv)
* "perleval()"
*/
void
-do_perleval(str, rettv)
- char_u *str;
- typval_T *rettv;
+do_perleval(
+ char_u *str,
+ typval_T *rettv)
{
char *err = NULL;
STRLEN err_len = 0;
@@ -1241,8 +1241,8 @@ do_perleval(str, rettv)
* ":perldo".
*/
void
-ex_perldo(eap)
- exarg_T *eap;
+ex_perldo(
+ exarg_T *eap)
{
STRLEN length;
SV *sv;
@@ -1314,9 +1314,12 @@ err:
}
#ifndef FEAT_WINDOWS
-int win_valid(win_T *w) { return TRUE; }
-int win_count() { return 1; }
-win_T *win_find_nr(int n) { return curwin; }
+int win_valid(win_T *w)
+{ return TRUE; }
+int win_count(void)
+{ return 1; }
+win_T *win_find_nr(int n)
+{ return curwin; }
#endif
XS(boot_VIM);
@@ -1513,7 +1516,7 @@ SetHeight(win, height)
curwin = savewin;
void
-Cursor(win, ...)
+Cursor(
VIWIN win
PPCODE:
diff --git a/src/os_unix.c b/src/os_unix.c
index 8d10b14..ccb6ea7 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2041,15 +2041,15 @@ set_x11_icon(char_u *icon)
#else /* FEAT_X11 */
static int
-get_x11_title(test_only)
- int test_only UNUSED;
+get_x11_title(
+ int test_only UNUSED)
{
return FALSE;
}
static int
-get_x11_icon(test_only)
- int test_only;
+get_x11_icon(
+ int test_only)
{
if (!test_only)
{
@@ -2333,9 +2333,9 @@ mch_get_host_name(char_u *s, int len)
# endif
void
-mch_get_host_name(s, len)
- char_u *s;
- int len;
+mch_get_host_name(
+ char_u *s,
+ int len)
{
# ifdef VAXC
vaxc$gethostname((char *)s, len);
@@ -2743,9 +2743,9 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
* Copy security info from "from_file" to "to_file".
*/
void
-mch_copy_sec(from_file, to_file)
- char_u *from_file;
- char_u *to_file;
+mch_copy_sec(
+ char_u *from_file,
+ char_u *to_file)
{
static const char * const smack_copied_attributes[] =
{
diff --git a/src/po/sjiscorr.c b/src/po/sjiscorr.c
index a0b09f0..2f55b9e 100644
--- a/src/po/sjiscorr.c
+++ b/src/po/sjiscorr.c
@@ -7,7 +7,7 @@
#include <string.h>
int
-main(int argc, char **argv);
+main(int argc, char **argv)
{
char buffer[BUFSIZ];
char *p;
diff --git a/src/pty.c b/src/pty.c
index 833b2d6..853c90c 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -195,8 +195,7 @@ OpenPTY(char **ttyn)
&& !defined(PTY_DONE)
#define PTY_DONE
int
-OpenPTY(ttyn)
- char **ttyn;
+OpenPTY(char **ttyn)
{
char *m, *s;
int f;
@@ -220,8 +219,7 @@ OpenPTY(ttyn)
#if defined(__sgi) && !defined(PTY_DONE)
#define PTY_DONE
int
-OpenPTY(ttyn)
- char **ttyn;
+OpenPTY(char **ttyn)
{
int f;
char *name;
@@ -246,8 +244,7 @@ OpenPTY(ttyn)
#if defined(MIPS) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE)
#define PTY_DONE
int
-OpenPTY(ttyn)
- char **ttyn;
+OpenPTY(char **ttyn)
{
int f;
struct stat buf;
@@ -274,8 +271,7 @@ OpenPTY(ttyn)
* Same for Mac OS X Leopard. */
#define PTY_DONE
int
-OpenPTY(ttyn)
- char **ttyn;
+OpenPTY(char **ttyn)
{
int f;
char *m;
@@ -316,8 +312,7 @@ int aixhack = -1;
#endif
int
-OpenPTY(ttyn)
- char **ttyn;
+OpenPTY(char **ttyn)
{
int f;
/* used for opening a new pty-pair: */
@@ -363,8 +358,7 @@ static char TtyProto[] = "/dev/ttyXY";
# endif
int
-OpenPTY(ttyn)
- char **ttyn;
+OpenPTY(char **ttyn)
{
char *p, *q, *l, *d;
int f;
diff --git a/src/testdir/test3.in b/src/testdir/test3.in
index c0a68d0..89a8871 100644
--- a/src/testdir/test3.in
+++ b/src/testdir/test3.in
@@ -201,9 +201,7 @@ ENDTEST
}
int
-func(a, b)
- int a;
- int c;
+func(int a, int c)
{
if (c1 && (c2 ||
c3))
diff --git a/src/testdir/test3.ok b/src/testdir/test3.ok
index c4c01a3..aacb1fc 100644
--- a/src/testdir/test3.ok
+++ b/src/testdir/test3.ok
@@ -189,9 +189,7 @@
}
int
-func(a, b)
- int a;
- int c;
+func(int a, int c)
{
if (c1 && (c2 ||
c3))