summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-03-18 23:18:11 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-04-03 00:22:08 +0200
commit0209b2c932994e9ca55d39d98a83ea02aacd1332 (patch)
treef8778cca656943ee36193b49a7727557ba82319b /utils
parent6f3d68bc8b46bdc7b0f5f43918744d99746672a2 (diff)
Modernize code by removing use of old style definitions.
Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
Diffstat (limited to 'utils')
-rw-r--r--utils/parse.c6
-rw-r--r--utils/pids.c2
-rw-r--r--utils/ps.c2
-rw-r--r--utils/storeinfo.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/utils/parse.c b/utils/parse.c
index 5334dbda..c3d28e5c 100644
--- a/utils/parse.c
+++ b/utils/parse.c
@@ -50,13 +50,13 @@ _parse_strlist (char *arg,
error_t err = 0;
char *end = arg;
- void mark_end()
+ void mark_end(void)
{
*end++ = '\0';
while (isspace(*end))
end++;
}
- error_t parse_element()
+ error_t parse_element(void)
{
char *cur = arg;
if (*cur == '\0')
@@ -119,7 +119,7 @@ parse_numlist (char *arg,
int (*lookup_fn)(const char *str, struct argp_state *state),
const char *type_name, struct argp_state *state)
{
- error_t default_num_add() { return (*add_fn)((*default_fn)(state), state); }
+ error_t default_num_add(void) { return (*add_fn)((*default_fn)(state), state); }
error_t add_num_str(const char *str, struct argp_state *state)
{
const char *p;
diff --git a/utils/pids.c b/utils/pids.c
index 59646a5a..82b75d1a 100644
--- a/utils/pids.c
+++ b/utils/pids.c
@@ -33,7 +33,7 @@ static process_t _proc_server = MACH_PORT_NULL;
/* Return this process's proc server. */
static inline process_t
-proc_server ()
+proc_server (void)
{
if (_proc_server == MACH_PORT_NULL)
_proc_server = getproc ();
diff --git a/utils/ps.c b/utils/ps.c
index b23dc1e2..91a00a36 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -250,7 +250,7 @@ main(int argc, char *argv[])
}
/* Returns the name of the current controlling terminal. */
- const char *current_tty_name()
+ const char *current_tty_name(void)
{
error_t err;
struct ps_tty *tty;
diff --git a/utils/storeinfo.c b/utils/storeinfo.c
index 8a9567e0..c837f5d6 100644
--- a/utils/storeinfo.c
+++ b/utils/storeinfo.c
@@ -81,7 +81,7 @@ print_store (struct store *store, int level, unsigned what)
int i;
int first = 1;
- void psep ()
+ void psep (void)
{
if (first)
first = 0;