aboutsummaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
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 /libshouldbeinlibc
parent6f3d68bc8b46bdc7b0f5f43918744d99746672a2 (diff)
downloadhurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.tar.gz
hurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.tar.bz2
hurd-0209b2c932994e9ca55d39d98a83ea02aacd1332.zip
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 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/idvec.c2
-rw-r--r--libshouldbeinlibc/localhost.c2
-rw-r--r--libshouldbeinlibc/portinfo.c4
-rw-r--r--libshouldbeinlibc/ugids.c2
-rw-r--r--libshouldbeinlibc/wire.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/libshouldbeinlibc/idvec.c b/libshouldbeinlibc/idvec.c
index 84131a62..848c4c52 100644
--- a/libshouldbeinlibc/idvec.c
+++ b/libshouldbeinlibc/idvec.c
@@ -25,7 +25,7 @@
/* Return a new, empty, idvec, or NULL if there wasn't enough memory. */
struct idvec *
-make_idvec ()
+make_idvec (void)
{
struct idvec *idvec = malloc (sizeof (struct idvec));
if (idvec)
diff --git a/libshouldbeinlibc/localhost.c b/libshouldbeinlibc/localhost.c
index 9b7d4e09..96fd649e 100644
--- a/libshouldbeinlibc/localhost.c
+++ b/libshouldbeinlibc/localhost.c
@@ -28,7 +28,7 @@
after the first call (so the result should be copied before modification).
If something goes wrong, 0 is returned, and errno set. */
char *
-localhost ()
+localhost (void)
{
static char *buf = 0;
static size_t buf_len = 0;
diff --git a/libshouldbeinlibc/portinfo.c b/libshouldbeinlibc/portinfo.c
index 42b22081..75a20bb9 100644
--- a/libshouldbeinlibc/portinfo.c
+++ b/libshouldbeinlibc/portinfo.c
@@ -43,14 +43,14 @@ print_port_info (mach_port_t name, mach_port_type_t type, task_t task,
{
int hex_names = (show & PORTINFO_HEX_NAMES);
int first = 1, subfirst = 1;
- void comma ()
+ void comma (void)
{
if (first)
first = 0;
else
fprintf (stream, ", ");
}
- void subcomma ()
+ void subcomma (void)
{
if (subfirst)
subfirst = 0;
diff --git a/libshouldbeinlibc/ugids.c b/libshouldbeinlibc/ugids.c
index cb2631be..4282c760 100644
--- a/libshouldbeinlibc/ugids.c
+++ b/libshouldbeinlibc/ugids.c
@@ -26,7 +26,7 @@
/* Return a new ugids structure, or 0 if an allocation error occurs. */
struct ugids *
-make_ugids ()
+make_ugids (void)
{
struct ugids *u = malloc (sizeof (struct ugids));
if (u)
diff --git a/libshouldbeinlibc/wire.c b/libshouldbeinlibc/wire.c
index 5d7fcfc5..ea6c5526 100644
--- a/libshouldbeinlibc/wire.c
+++ b/libshouldbeinlibc/wire.c
@@ -127,7 +127,7 @@ wire_segment (vm_address_t start,
/* Wire down all the text and data (including from shared libraries)
for the current program. */
error_t
-wire_task_self ()
+wire_task_self (void)
{
mach_port_t host, device;
error_t err;