]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Bad function definition
authorDimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Sun, 6 Aug 2023 17:44:37 +0000 (19:44 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 11 Sep 2023 08:15:30 +0000 (10:15 +0200)
void f() should probably be void f(void)

Found by running the checkpatch.pl Linux script to enforce coding style.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21468)

apps/s_server.c
crypto/sha/keccak1600.c
demos/sslecho/main.c
include/internal/e_os.h

index 1dc04d0060d4b5b9ee9f591072f15395c9156f4c..93f6cb2983f7df1a80c3e3b9ca4b77260f87896c 100644 (file)
@@ -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,
index 17909a769b2e033456806541eef30ed58affe728..062111b6380ca6ed2b2accd3ca858e4789d4578c 100644 (file)
@@ -1153,7 +1153,7 @@ void SHA3_sponge(const unsigned char *inp, size_t len,
 
 # include <stdio.h>
 
-int main()
+int main(void)
 {
     /*
      * This is 5-bit SHAKE128 test from http://csrc.nist.gov/groups/ST/toolkit/examples.html#aHashing
index bdc824f2c785e7223a4909be56e211f0c0f22c2f..8cf774450171cc5305b6436cd1e5cf23f282fd6c 100644 (file)
@@ -118,7 +118,7 @@ void configure_client_context(SSL_CTX *ctx)
     }
 }
 
-void usage()
+void usage(void)
 {
     printf("Usage: sslecho s\n");
     printf("       --or--\n");
index 6d15bc55ee6e094cd8d0a0d8ddea98d1b5545737..d0e903f653ed62044863a84cfc586131d84bc612 100644 (file)
@@ -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 <cextdecs.h(PROCESSHANDLE_GETMINE_)>
 #    include <cextdecs.h(PROCESSHANDLE_DECOMPOSE_)>
-       inline int nssgetpid()
+       inline int nssgetpid(void)
        {
          short phandle[10]={0};
          union pseudo_pid {