Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use (void) in no-arguments function definitions.
  • Loading branch information
Joseph Myers committed Jun 8, 2013
1 parent 2e09a79 commit 60d2f8f
Show file tree
Hide file tree
Showing 81 changed files with 226 additions and 107 deletions.
109 changes: 109 additions & 0 deletions ChangeLog
@@ -1,3 +1,112 @@
2013-06-08 Joseph Myers <joseph@codesourcery.com>

* catgets/gencat.c (error_print): Use (void) in function
definition.
* crypt/crypt_util.c (__init_des): Likewise.
* crypt/speeds.c (Stop): Likewise.
(main): Likewise.
* hurd/hurdmalloc.c (print_malloc_free_list): Likewise.
* inet/ruserpass.c (token): Likewise.
* intl/finddomain.c (_nl_finddomain_subfreeres): Likewise.
* intl/localealias.c (extend_alias_table): Likewise.
* intl/plural-exp.c (init_germanic_plural): Likewise.
* libio/fcloseall.c (__fcloseall): Likewise.
* libio/genops.c (_IO_flush_all): Likewise.
(_IO_flush_all_linebuffered): Likewise.
(_IO_cleanup): Likewise.
(_IO_iter_begin): Likewise.
(_IO_iter_end): Likewise.
(_IO_list_lock): Likewise.
(_IO_list_unlock): Likewise.
(_IO_list_resetlock): Likewise.
* libio/getchar.c (getchar): Likewise.
* libio/getchar_u.c (getchar_unlocked): Likewise.
* libio/getwchar.c (getwchar): Likewise.
* libio/getwchar_u.c (getwchar_unlocked): Likewise.
* libio/oldstdfiles.c (_IO_check_libio): Likewise.
* login/getpt.c (__getpt): Likewise.
* login/tst-utmp.c (main): Likewise.
* malloc/hooks.c (__malloc_check_init): Likewise.
* malloc/malloc.c (__malloc_stats): Likewise.
* malloc/mtrace.c (tr_break): Likewise.
(mtrace): Likewise.
(muntrace): Likewise.
* misc/fstab.c (endfsent): Likewise.
* misc/getclktck.c (__getclktck): Likewise.
* misc/getdtsz.c (__getdtablesize): Likewise.
* misc/gethostid.c (gethostid): Likewise.
* misc/getpagesize.c (__getpagesize): Likewise.
* misc/getsysstats.c (__get_nprocs_conf): Likewise.
(__get_nprocs): Likewise.
(__get_phys_pages): Likewise.
(__get_avphys_pages): Likewise.
* misc/getttyent.c (getttyent): Likewise.
(setttyent): Likewise.
(endttyent): Likewise.
* misc/getusershell.c (getusershell): Likewise.
(endusershell): Likewise.
(setusershell): Likewise.
(initshells): Likewise.
* misc/hsearch.c (__hdestroy): Likewise.
* misc/sync.c (sync): Likewise.
* misc/syslog.c (closelog_internal): Likewise.
(closelog): Likewise.
* misc/ttyslot.c (ttyslot): Likewise.
* misc/vhangup.c (vhangup): Likewise.
* posix/fork.c (__fork): Likewise.
* posix/getegid.c (__getegid): Likewise.
* posix/geteuid.c (__geteuid): Likewise.
* posix/getgid.c (__getgid): Likewise.
* posix/getpid.c (__getpid): Likewise.
* posix/getppid.c (__getppid): Likewise.
* posix/getuid.c (__getuid): Likewise.
* posix/pause.c (pause): Likewise.
* posix/setpgrp.c (setpgrp): Likewise.
* posix/setsid.c (__setsid): Likewise.
* posix/test-vfork.c (noop): Likewise.
* resolv/gethnamaddr.c (_endhtent): Likewise.
(_gethtent): Likewise.
(ht_endhostent): Likewise.
(gethostent): Likewise.
(dns_service): Likewise.
* stdlib/drand48.c (drand48): Likewise.
* stdlib/lrand48.c (lrand48): Likewise.
* stdlib/mrand48.c (mrand48): Likewise.
* stdlib/rand.c (rand): Likewise.
* stdlib/random.c (__random): Likewise.
* stdlib/setenv.c (clearenv): Likewise.
* sunrpc/clnt_tcp.c (clnttcp_abort): Likewise.
* sunrpc/clnt_unix.c (clntunix_abort): Likewise.
* sysdeps/mach/getpagesize.c (__getpagesize): Likewise.
* sysdeps/mach/getsysstats.c (__get_nprocs_conf): Likewise.
(__get_nprocs): Likewise.
(__get_phys_pages): Likewise.
(__get_avphys_pages): Likewise.
* sysdeps/mach/hurd/dl-sysdep.c (__getpid): Likewise.
* sysdeps/mach/hurd/getclktck.c (__getclktck): Likewise.
* sysdeps/mach/hurd/getdtsz.c (__getdtablesize): Likewise.
* sysdeps/mach/hurd/getegid.c (__getegid): Likewise.
* sysdeps/mach/hurd/geteuid.c (__geteuid): Likewise.
* sysdeps/mach/hurd/getgid.c (__getgid): Likewise.
* sysdeps/mach/hurd/gethostid.c (gethostid): Likewise.
* sysdeps/mach/hurd/getlogin.c (getlogin): Likewise.
* sysdeps/mach/hurd/getpid.c (__getpid): Likewise.
* sysdeps/mach/hurd/getppid.c (__getppid): Likewise.
* sysdeps/mach/hurd/getuid.c (__getuid): Likewise.
* sysdeps/mach/hurd/sync.c (sync): Likewise.
* sysdeps/posix/clock.c (clock): Likewise.
* sysdeps/unix/bsd/setsid.c (__setsid): Likewise.
* sysdeps/unix/getpagesize.c (__getpagesize): Likewise.
* sysdeps/unix/sysv/linux/getclktck.c (__getclktck): Likewise.
* sysdeps/unix/sysv/linux/gethostid.c (gethostid): Likewise.
* sysdeps/unix/sysv/linux/getpagesize.c (__getpagesize): Likewise.
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Likewise.
(__get_nprocs_conf): Likewise.
(__get_phys_pages): Likewise.
(__get_avphys_pages): Likewise.
* time/clock.c (clock): Likewise.
* time/tzset.c (__tzname_max): Likewise.

2013-06-07 Joseph Myers <joseph@codesourcery.com>

* bits/byteswap.h [__GNUC__ && !__GNUC_PREREQ (4, 3)]
Expand Down
2 changes: 1 addition & 1 deletion catgets/gencat.c
Expand Up @@ -254,7 +254,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
/* The address of this function will be assigned to the hook in the
error functions. */
static void
error_print ()
error_print (void)
{
/* We don't want the program name to be printed in messages. Emacs'
compile.el does not like this. */
Expand Down
2 changes: 1 addition & 1 deletion crypt/crypt_util.c
Expand Up @@ -553,7 +553,7 @@ __init_des_r(__data)
}

void
__init_des()
__init_des (void)
{
__init_des_r(&_ufc_foobar);
}
Expand Down
4 changes: 2 additions & 2 deletions crypt/speeds.c
Expand Up @@ -42,7 +42,7 @@ struct tms tstart, tfinish;
char *crypt(), *fcrypt();

void
Stop ()
Stop (void)
{
double elapsed;
#ifdef NO_ITIMER
Expand Down Expand Up @@ -76,7 +76,7 @@ static void clearmem(start, cnt)
*start++ = '\0';
}

main ()
main (void)
{
char *s;
#ifdef NO_ITIMER
Expand Down
2 changes: 1 addition & 1 deletion hurd/hurdmalloc.c
Expand Up @@ -380,7 +380,7 @@ realloc(old_base, new_size)

#ifdef DEBUG
void
print_malloc_free_list()
print_malloc_free_list (void)
{
int i, size;
free_list_t fl;
Expand Down
2 changes: 1 addition & 1 deletion inet/ruserpass.c
Expand Up @@ -289,7 +289,7 @@ ruserpass(host, aname, apass)
libc_hidden_def (ruserpass)

static int
token()
token (void)
{
char *cp;
int c;
Expand Down
2 changes: 1 addition & 1 deletion intl/finddomain.c
Expand Up @@ -170,7 +170,7 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
/* This is called from iconv/gconv_db.c's free_mem, as locales must
be freed before freeing gconv steps arrays. */
void __libc_freeres_fn_section
_nl_finddomain_subfreeres ()
_nl_finddomain_subfreeres (void)
{
struct loaded_l10nfile *runp = _nl_loaded_domains;

Expand Down
2 changes: 1 addition & 1 deletion intl/localealias.c
Expand Up @@ -362,7 +362,7 @@ read_alias_file (fname, fname_len)


static int
extend_alias_table ()
extend_alias_table (void)
{
size_t new_size;
struct alias_map *new_map;
Expand Down
2 changes: 1 addition & 1 deletion intl/plural-exp.c
Expand Up @@ -72,7 +72,7 @@ static struct expression plone;
struct expression GERMANIC_PLURAL;

static void
init_germanic_plural ()
init_germanic_plural (void)
{
if (plone.val.num == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion libio/fcloseall.c
Expand Up @@ -28,7 +28,7 @@
#include <stdio.h>

int
__fcloseall ()
__fcloseall (void)
{
/* Close all streams. */
return _IO_cleanup ();
Expand Down
16 changes: 8 additions & 8 deletions libio/genops.c
Expand Up @@ -873,15 +873,15 @@ _IO_flush_all_lockp (int do_lock)


int
_IO_flush_all ()
_IO_flush_all (void)
{
/* We want locking. */
return _IO_flush_all_lockp (1);
}
libc_hidden_def (_IO_flush_all)

void
_IO_flush_all_linebuffered ()
_IO_flush_all_linebuffered (void)
{
struct _IO_FILE *fp;
int last_stamp;
Expand Down Expand Up @@ -1006,7 +1006,7 @@ libc_freeres_fn (buffer_free)


int
_IO_cleanup ()
_IO_cleanup (void)
{
/* We do *not* want locking. Some threads might use streams but
that is their problem, we flush them underneath them. */
Expand Down Expand Up @@ -1266,14 +1266,14 @@ _IO_default_imbue (fp, locale)
}

_IO_ITER
_IO_iter_begin()
_IO_iter_begin (void)
{
return (_IO_ITER) _IO_list_all;
}
libc_hidden_def (_IO_iter_begin)

_IO_ITER
_IO_iter_end()
_IO_iter_end (void)
{
return NULL;
}
Expand All @@ -1296,7 +1296,7 @@ _IO_iter_file(iter)
libc_hidden_def (_IO_iter_file)

void
_IO_list_lock()
_IO_list_lock (void)
{
#ifdef _IO_MTSAFE_IO
_IO_lock_lock (list_all_lock);
Expand All @@ -1305,7 +1305,7 @@ _IO_list_lock()
libc_hidden_def (_IO_list_lock)

void
_IO_list_unlock()
_IO_list_unlock (void)
{
#ifdef _IO_MTSAFE_IO
_IO_lock_unlock (list_all_lock);
Expand All @@ -1314,7 +1314,7 @@ _IO_list_unlock()
libc_hidden_def (_IO_list_unlock)

void
_IO_list_resetlock()
_IO_list_resetlock (void)
{
#ifdef _IO_MTSAFE_IO
_IO_lock_init (list_all_lock);
Expand Down
2 changes: 1 addition & 1 deletion libio/getchar.c
Expand Up @@ -30,7 +30,7 @@
#undef getchar

int
getchar ()
getchar (void)
{
int result;
_IO_acquire_lock (_IO_stdin);
Expand Down
2 changes: 1 addition & 1 deletion libio/getchar_u.c
Expand Up @@ -30,7 +30,7 @@
#undef getchar_unlocked

int
getchar_unlocked ()
getchar_unlocked (void)
{
return _IO_getc_unlocked (_IO_stdin);
}
2 changes: 1 addition & 1 deletion libio/getwchar.c
Expand Up @@ -30,7 +30,7 @@
#undef getwchar

wint_t
getwchar ()
getwchar (void)
{
wint_t result;
_IO_acquire_lock (_IO_stdin);
Expand Down
2 changes: 1 addition & 1 deletion libio/getwchar_u.c
Expand Up @@ -30,7 +30,7 @@
#undef getwchar_unlocked

wint_t
getwchar_unlocked ()
getwchar_unlocked (void)
{
return _IO_getwc_unlocked (_IO_stdin);
}
2 changes: 1 addition & 1 deletion libio/oldstdfiles.c
Expand Up @@ -73,7 +73,7 @@ static void _IO_check_libio (void) __THROW __attribute__ ((constructor));
_IO_list_all accordingly. */

static void
_IO_check_libio ()
_IO_check_libio (void)
{
if (&_IO_stdin_used == NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion login/getpt.c
Expand Up @@ -22,7 +22,7 @@
/* Open the master side of a pseudoterminal and return its file
descriptor, or -1 on error. */
int
__getpt ()
__getpt (void)
{
__set_errno (ENOSYS);
return -1;
Expand Down
2 changes: 1 addition & 1 deletion login/tst-utmp.c
Expand Up @@ -395,7 +395,7 @@ do_test (int argc, char *argv[])

/* No field 'ut_type' in struct utmp. */
int
main ()
main (void)
{
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion malloc/hooks.c
Expand Up @@ -69,7 +69,7 @@ static int disallow_malloc_check;

/* Activate a standard set of debugging hooks. */
void
__malloc_check_init()
__malloc_check_init (void)
{
if (disallow_malloc_check) {
disallow_malloc_check = 0;
Expand Down
2 changes: 1 addition & 1 deletion malloc/malloc.c
Expand Up @@ -4602,7 +4602,7 @@ struct mallinfo __libc_mallinfo()
*/

void
__malloc_stats()
__malloc_stats (void)
{
int i;
mstate ar_ptr;
Expand Down
6 changes: 3 additions & 3 deletions malloc/mtrace.c
Expand Up @@ -72,7 +72,7 @@ static __ptr_t (*tr_old_memalign_hook) (size_t __alignment, size_t __size,
extern void tr_break (void) __THROW;
libc_hidden_proto (tr_break)
void
tr_break ()
tr_break (void)
{
}
libc_hidden_def (tr_break)
Expand Down Expand Up @@ -298,7 +298,7 @@ release_libc_mem (void)
don't forget to set a breakpoint on tr_break! */

void
mtrace ()
mtrace (void)
{
#ifdef _LIBC
static int added_atexit_handler;
Expand Down Expand Up @@ -363,7 +363,7 @@ mtrace ()
}

void
muntrace ()
muntrace (void)
{
if (mallstream == NULL)
return;
Expand Down
2 changes: 1 addition & 1 deletion misc/fstab.c
Expand Up @@ -95,7 +95,7 @@ getfsfile (name)


void
endfsent ()
endfsent (void)
{
struct fstab_state *state;

Expand Down
2 changes: 1 addition & 1 deletion misc/getclktck.c
Expand Up @@ -19,7 +19,7 @@

/* Return frequency of times(). */
int
__getclktck ()
__getclktck (void)
{
#ifdef CLK_TCK
return CLK_TCK;
Expand Down

0 comments on commit 60d2f8f

Please sign in to comment.