Skip to content

Commit

Permalink
Fix bad function definition
Browse files Browse the repository at this point in the history
Warnings by checkpatch.pl.
I have learned something today:
https://eklitzke.org/c-functions-without-arguments

Signed-off-by: Dimitri Papadopoulos <3350651+DimitriPapadopoulos@users.noreply.gitlab.com>
  • Loading branch information
Dimitri Papadopoulos authored and Dimitri Papadopoulos committed Jun 29, 2021
1 parent 789e04e commit 0bef505
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion array.c
Expand Up @@ -48,7 +48,7 @@

#include "openconnect-internal.h"

static struct oc_auth_form *plain_auth_form() {
static struct oc_auth_form *plain_auth_form(void) {
struct oc_auth_form *form;
struct oc_form_opt *opt, *opt2, *opt3;

Expand Down
2 changes: 1 addition & 1 deletion compat.c
Expand Up @@ -268,7 +268,7 @@ char *openconnect__win32_strerror(DWORD err)
return msgutf8;
}

int openconnect__win32_sock_init()
int openconnect__win32_sock_init(void)
{
WSADATA data;
if (WSAStartup (MAKEWORD(1, 1), &data) != 0) {
Expand Down
2 changes: 1 addition & 1 deletion f5.c
Expand Up @@ -37,7 +37,7 @@

#define XCAST(x) ((const xmlChar *)(x))

static struct oc_auth_form *plain_auth_form() {
static struct oc_auth_form *plain_auth_form(void) {
struct oc_auth_form *form;
struct oc_form_opt *opt, *opt2;

Expand Down
4 changes: 2 additions & 2 deletions gnutls.c
Expand Up @@ -67,7 +67,7 @@ static int gnutls_pin_callback(void *priv, int attempt, const char *uri,

static char tls_library_version[32] = "";

const char *openconnect_get_tls_library_version()
const char *openconnect_get_tls_library_version(void)
{
if (!*tls_library_version) {
snprintf(tls_library_version, sizeof(tls_library_version), "GnuTLS %s",
Expand All @@ -76,7 +76,7 @@ const char *openconnect_get_tls_library_version()
return tls_library_version;
}

int can_enable_insecure_crypto()
int can_enable_insecure_crypto(void)
{
/* XX: As of GnuTLS 3.6.13, no released version has (yet) removed 3DES/RC4 from default builds,
* but like OpenSSL (removed in 1.1.0) it may happen. */
Expand Down
4 changes: 2 additions & 2 deletions openssl.c
Expand Up @@ -52,7 +52,7 @@ typedef int (*X509_STORE_CTX_get_issuer_fn)(X509 **issuer,

static char tls_library_version[32] = "";

const char *openconnect_get_tls_library_version()
const char *openconnect_get_tls_library_version(void)
{
if (!*tls_library_version) {
strncpy(tls_library_version, SSLeay_version(SSLEAY_VERSION), sizeof(tls_library_version));
Expand All @@ -61,7 +61,7 @@ const char *openconnect_get_tls_library_version()
return tls_library_version;
}

int can_enable_insecure_crypto()
int can_enable_insecure_crypto(void)
{
if (EVP_des_ede3_cbc() == NULL ||
EVP_rc4() == NULL)
Expand Down
2 changes: 1 addition & 1 deletion ssl.c
Expand Up @@ -65,7 +65,7 @@
#endif
#endif

static inline int connect_pending()
static inline int connect_pending(void)
{
#ifdef _WIN32
return WSAGetLastError() == WSAEWOULDBLOCK;
Expand Down

0 comments on commit 0bef505

Please sign in to comment.