From e22ebb893e2f44bd08f69f9ce4ccfc5e4d2990e2 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 6 Aug 2023 19:44:37 +0200 Subject: [PATCH] Bad function definition void f() should probably be void f(void) Found by running the checkpatch.pl Linux script to enforce coding style. Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/21468) --- apps/s_server.c | 2 +- crypto/sha/keccak1600.c | 2 +- demos/sslecho/main.c | 2 +- include/internal/e_os.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/s_server.c b/apps/s_server.c index 1dc04d0060..93f6cb2983 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -266,7 +266,7 @@ typedef struct { char buff[1]; } EBCDIC_OUTBUFF; -static const BIO_METHOD *BIO_f_ebcdic_filter() +static const BIO_METHOD *BIO_f_ebcdic_filter(void) { if (methods_ebcdic == NULL) { methods_ebcdic = BIO_meth_new(BIO_TYPE_EBCDIC_FILTER, diff --git a/crypto/sha/keccak1600.c b/crypto/sha/keccak1600.c index 17909a769b..062111b638 100644 --- a/crypto/sha/keccak1600.c +++ b/crypto/sha/keccak1600.c @@ -1153,7 +1153,7 @@ void SHA3_sponge(const unsigned char *inp, size_t len, # include -int main() +int main(void) { /* * This is 5-bit SHAKE128 test from http://csrc.nist.gov/groups/ST/toolkit/examples.html#aHashing diff --git a/demos/sslecho/main.c b/demos/sslecho/main.c index bdc824f2c7..8cf7744501 100644 --- a/demos/sslecho/main.c +++ b/demos/sslecho/main.c @@ -118,7 +118,7 @@ void configure_client_context(SSL_CTX *ctx) } } -void usage() +void usage(void) { printf("Usage: sslecho s\n"); printf(" --or--\n"); diff --git a/include/internal/e_os.h b/include/internal/e_os.h index 6d15bc55ee..d0e903f653 100644 --- a/include/internal/e_os.h +++ b/include/internal/e_os.h @@ -152,7 +152,7 @@ static __inline unsigned int _strlen31(const char *str) # undef stdin # undef stdout # undef stderr -FILE *__iob_func(); +FILE *__iob_func(void); # define stdin (&__iob_func()[0]) # define stdout (&__iob_func()[1]) # define stderr (&__iob_func()[2]) @@ -304,12 +304,12 @@ struct servent *getservbyname(const char *name, const char *proto); # define gethostbyname(name) gethostbyname((char*)name) # define ioctlsocket(a,b,c) ioctl(a,b,c) # ifdef NO_GETPID -inline int nssgetpid(); +inline int nssgetpid(void); # ifndef NSSGETPID_MACRO # define NSSGETPID_MACRO # include # include - inline int nssgetpid() + inline int nssgetpid(void) { short phandle[10]={0}; union pseudo_pid {