Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryowl <scott.waye@hubse.com>2022-10-01 22:19:07 +0300
committerGitHub <noreply@github.com>2022-10-01 22:19:07 +0300
commitd320fd90a2976b388169dd51b3732ad01bcb4266 (patch)
treecdfa22d3fc1bc73dbd44bc125f875900a0812b0a /src
parent06ce127b1d39c7292938364c322d9b13ce00215d (diff)
Reinstate strict prototypes warning (#76463)
* reinstate strict-prototype warning * More fixes * Need to keep the warning disabled for zlib https://github.com/madler/zlib/issues/633 Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r--src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h2
-rw-r--r--src/mono/mono/eventpipe/ep-rt-mono.c6
-rw-r--r--src/mono/mono/eventpipe/ep-rt-mono.h4
-rw-r--r--src/mono/mono/metadata/appdomain.c2
-rw-r--r--src/mono/mono/metadata/assembly.c2
-rw-r--r--src/mono/mono/metadata/boehm-gc.c4
-rw-r--r--src/mono/mono/metadata/class-init.c4
-rw-r--r--src/mono/mono/metadata/domain.c2
-rw-r--r--src/mono/mono/metadata/exception.c4
-rw-r--r--src/mono/mono/metadata/loader.c2
-rw-r--r--src/mono/mono/metadata/sgen-mono.c2
-rw-r--r--src/mono/mono/metadata/sgen-stw.c2
-rw-r--r--src/mono/mono/mini/exceptions-amd64.c4
-rw-r--r--src/mono/mono/mini/exceptions-x86.c4
-rw-r--r--src/mono/mono/mini/jit-icalls.c6
-rw-r--r--src/mono/mono/mini/llvm-jit.cpp4
-rw-r--r--src/mono/mono/mini/mini-runtime.c2
-rw-r--r--src/mono/mono/mini/mini.c2
-rw-r--r--src/mono/mono/mini/trace.c2
-rw-r--r--src/mono/mono/sgen/sgen-gc.c2
-rw-r--r--src/mono/mono/utils/mach-support-amd64.c6
-rw-r--r--src/mono/mono/utils/mach-support-arm.c6
-rw-r--r--src/mono/mono/utils/mach-support-arm64.c6
-rw-r--r--src/mono/mono/utils/mach-support-unknown.c6
-rw-r--r--src/mono/mono/utils/mach-support-x86.c6
-rw-r--r--src/mono/mono/utils/mono-cgroup.c8
-rw-r--r--src/mono/mono/utils/mono-log-android.c2
-rw-r--r--src/mono/mono/utils/mono-log-common.c2
-rw-r--r--src/mono/mono/utils/mono-log-darwin.c2
-rw-r--r--src/mono/mono/utils/mono-log-posix.c2
-rw-r--r--src/mono/mono/utils/mono-log-windows.c2
-rw-r--r--src/mono/mono/utils/mono-proclib.c2
-rw-r--r--src/mono/mono/utils/mono-signal-handler.c2
-rw-r--r--src/mono/wasi/mono-wasi-driver/driver.c4
-rw-r--r--src/mono/wasi/mono-wasi-driver/stubs.c2
-rw-r--r--src/mono/wasm/runtime/corebindings.c2
-rw-r--r--src/mono/wasm/runtime/driver.c8
-rw-r--r--src/native/libs/CMakeLists.txt1
-rw-r--r--src/native/libs/System.Globalization.Native/pal_calendarData.c2
-rw-r--r--src/native/libs/System.Globalization.Native/pal_icushim.c8
-rw-r--r--src/native/libs/System.Globalization.Native/pal_locale.c2
-rw-r--r--src/native/libs/System.IO.Compression.Native/CMakeLists.txt8
-rw-r--r--src/native/libs/System.Native/pal_console.c16
-rw-r--r--src/native/libs/System.Native/pal_datetime.c4
-rw-r--r--src/native/libs/System.Native/pal_environment.c2
-rw-r--r--src/native/libs/System.Native/pal_io.c2
-rw-r--r--src/native/libs/System.Native/pal_networkstatistics.c6
-rw-r--r--src/native/libs/System.Native/pal_process.c6
-rw-r--r--src/native/libs/System.Native/pal_runtimeinformation.c4
-rw-r--r--src/native/libs/System.Native/pal_searchpath.c2
-rw-r--r--src/native/libs/System.Native/pal_signal.c8
-rw-r--r--src/native/libs/System.Native/pal_threading.c6
-rw-r--r--src/native/libs/System.Native/pal_time.c4
-rw-r--r--src/native/libs/System.Native/pal_uid.c4
-rw-r--r--src/native/libs/System.Net.Security.Native/pal_gssapi.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c12
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c4
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c4
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c4
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/apibridge.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/openssl.c20
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/opensslshim.c4
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_asn1.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_bio.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_err.c6
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_evp.c12
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c56
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c2
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_ssl.c10
-rw-r--r--src/native/libs/System.Security.Cryptography.Native/pal_x509.c4
74 files changed, 190 insertions, 191 deletions
diff --git a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
index 15496ed65c9..6e8227dfc04 100644
--- a/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
+++ b/src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
@@ -2065,7 +2065,7 @@ ep_rt_thread_create (
static
inline
void
-ep_rt_set_server_name()
+ep_rt_set_server_name(void)
{
::SetThreadName(GetCurrentThread(), W(".NET EventPipe"));
}
diff --git a/src/mono/mono/eventpipe/ep-rt-mono.c b/src/mono/mono/eventpipe/ep-rt-mono.c
index ad5d7c67ba9..2be10d51cbb 100644
--- a/src/mono/mono/eventpipe/ep-rt-mono.c
+++ b/src/mono/mono/eventpipe/ep-rt-mono.c
@@ -2120,13 +2120,13 @@ ep_rt_mono_rand_try_get_bytes (
}
char *
-ep_rt_mono_get_managed_cmd_line ()
+ep_rt_mono_get_managed_cmd_line (void)
{
return mono_runtime_get_managed_cmd_line ();
}
char *
-ep_rt_mono_get_os_cmd_line ()
+ep_rt_mono_get_os_cmd_line (void)
{
MONO_REQ_GC_NEUTRAL_MODE;
@@ -3084,7 +3084,7 @@ struct _BulkTypeEventLogger {
static
BulkTypeEventLogger*
-ep_rt_bulk_type_event_logger_alloc ()
+ep_rt_bulk_type_event_logger_alloc (void)
{
BulkTypeEventLogger *type_logger = g_malloc0 (sizeof (BulkTypeEventLogger));
type_logger->bulk_type_event_buffer = g_malloc0 (sizeof (uint8_t) * MAX_SIZE_OF_EVENT_BUFFER);
diff --git a/src/mono/mono/eventpipe/ep-rt-mono.h b/src/mono/mono/eventpipe/ep-rt-mono.h
index 7afada2dba4..2e3bdabac80 100644
--- a/src/mono/mono/eventpipe/ep-rt-mono.h
+++ b/src/mono/mono/eventpipe/ep-rt-mono.h
@@ -1362,7 +1362,7 @@ ep_rt_thread_create (
static
inline
void
-ep_rt_set_server_name()
+ep_rt_set_server_name(void)
{
mono_native_thread_set_name(mono_native_thread_id_get(), ".NET EventPipe");
}
@@ -1963,7 +1963,7 @@ ep_rt_runtime_version_get_utf8 (void)
static
inline
void
-ep_rt_thread_setup ()
+ep_rt_thread_setup (void)
{
ep_rt_mono_thread_setup (false);
}
diff --git a/src/mono/mono/metadata/appdomain.c b/src/mono/mono/metadata/appdomain.c
index 389beae290f..686ec7e0ed5 100644
--- a/src/mono/mono/metadata/appdomain.c
+++ b/src/mono/mono/metadata/appdomain.c
@@ -977,7 +977,7 @@ runtimeconfig_json_read_props (const char *ptr, const char **endp, int nprops, g
}
void
-mono_security_enable_core_clr ()
+mono_security_enable_core_clr (void)
{
// no-op
}
diff --git a/src/mono/mono/metadata/assembly.c b/src/mono/mono/metadata/assembly.c
index 43826b5a923..07023d85f49 100644
--- a/src/mono/mono/metadata/assembly.c
+++ b/src/mono/mono/metadata/assembly.c
@@ -2680,7 +2680,7 @@ mono_assembly_load_with_partial_name_internal (const char *name, MonoAssemblyLoa
}
MonoAssembly*
-mono_assembly_load_corlib ()
+mono_assembly_load_corlib (void)
{
MonoAssemblyName *aname;
MonoAssemblyOpenRequest req;
diff --git a/src/mono/mono/metadata/boehm-gc.c b/src/mono/mono/metadata/boehm-gc.c
index 718849dfc10..879aadfa1af 100644
--- a/src/mono/mono/metadata/boehm-gc.c
+++ b/src/mono/mono/metadata/boehm-gc.c
@@ -1097,12 +1097,12 @@ mono_gc_set_stack_end (void *stack_end)
{
}
-void GC_start_blocking ()
+void GC_start_blocking (void)
{
}
-void GC_end_blocking ()
+void GC_end_blocking (void)
{
}
diff --git a/src/mono/mono/metadata/class-init.c b/src/mono/mono/metadata/class-init.c
index ad3eee64e68..32576a730d6 100644
--- a/src/mono/mono/metadata/class-init.c
+++ b/src/mono/mono/metadata/class-init.c
@@ -2553,13 +2553,13 @@ initialize_object_slots (MonoClass *klass)
}
int
-mono_class_get_object_finalize_slot ()
+mono_class_get_object_finalize_slot (void)
{
return finalize_slot;
}
MonoMethod *
-mono_class_get_default_finalize_method ()
+mono_class_get_default_finalize_method (void)
{
int const i = finalize_slot;
return (i < 0) ? NULL : mono_defaults.object_class->vtable [i];
diff --git a/src/mono/mono/metadata/domain.c b/src/mono/mono/metadata/domain.c
index 7360b9e36e5..94d1de3be33 100644
--- a/src/mono/mono/metadata/domain.c
+++ b/src/mono/mono/metadata/domain.c
@@ -385,7 +385,7 @@ mono_get_root_domain (void)
* \returns the current domain
*/
MonoDomain *
-mono_domain_get ()
+mono_domain_get (void)
{
return GET_APPDOMAIN ();
}
diff --git a/src/mono/mono/metadata/exception.c b/src/mono/mono/metadata/exception.c
index 0e3a9efaabf..0095d8766b9 100644
--- a/src/mono/mono/metadata/exception.c
+++ b/src/mono/mono/metadata/exception.c
@@ -464,7 +464,7 @@ mono_get_exception_serialization (const char *msg)
* \returns a new instance of the \c System.InvalidCastException
*/
MonoException *
-mono_get_exception_invalid_cast ()
+mono_get_exception_invalid_cast (void)
{
return mono_exception_from_name (mono_get_corlib (), "System", "InvalidCastException");
}
@@ -493,7 +493,7 @@ mono_exception_new_invalid_operation (const char *msg, MonoError *error)
* \returns a new instance of the \c System.IndexOutOfRangeException
*/
MonoException *
-mono_get_exception_index_out_of_range ()
+mono_get_exception_index_out_of_range (void)
{
return mono_exception_from_name (mono_get_corlib (), "System",
"IndexOutOfRangeException");
diff --git a/src/mono/mono/metadata/loader.c b/src/mono/mono/metadata/loader.c
index 86b60c0a6e3..932b2fa8708 100644
--- a/src/mono/mono/metadata/loader.c
+++ b/src/mono/mono/metadata/loader.c
@@ -79,7 +79,7 @@ static gint32 methods_size;
static gint32 signatures_size;
void
-mono_loader_init ()
+mono_loader_init (void)
{
static gboolean inited;
diff --git a/src/mono/mono/metadata/sgen-mono.c b/src/mono/mono/metadata/sgen-mono.c
index 373c8f886a5..64f8bda2b27 100644
--- a/src/mono/mono/metadata/sgen-mono.c
+++ b/src/mono/mono/metadata/sgen-mono.c
@@ -2148,7 +2148,7 @@ mono_gc_set_gc_callbacks (MonoGCCallbacks *callbacks)
}
MonoGCCallbacks *
-mono_gc_get_gc_callbacks ()
+mono_gc_get_gc_callbacks (void)
{
return &gc_callbacks;
}
diff --git a/src/mono/mono/metadata/sgen-stw.c b/src/mono/mono/metadata/sgen-stw.c
index 3a93bec6bbf..29a19aef06a 100644
--- a/src/mono/mono/metadata/sgen-stw.c
+++ b/src/mono/mono/metadata/sgen-stw.c
@@ -44,7 +44,7 @@ static void unified_suspend_stop_world (MonoThreadInfoFlags flags, unified_suspe
static TV_DECLARE (end_of_last_stw);
-guint64 mono_time_since_last_stw ()
+guint64 mono_time_since_last_stw (void)
{
if (end_of_last_stw == 0)
return 0;
diff --git a/src/mono/mono/mini/exceptions-amd64.c b/src/mono/mono/mini/exceptions-amd64.c
index 5faa2e08596..2b0ceb5b0b5 100644
--- a/src/mono/mono/mini/exceptions-amd64.c
+++ b/src/mono/mono/mini/exceptions-amd64.c
@@ -195,7 +195,7 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
return res;
}
-void win32_seh_init()
+void win32_seh_init(void)
{
if (!mono_aot_only)
restore_stack = (void (*) (void))get_win32_restore_stack ();
@@ -204,7 +204,7 @@ void win32_seh_init()
mono_win_vectored_exception_handle = AddVectoredExceptionHandler (1, seh_vectored_exception_handler);
}
-void win32_seh_cleanup()
+void win32_seh_cleanup(void)
{
guint32 ret = 0;
diff --git a/src/mono/mono/mini/exceptions-x86.c b/src/mono/mono/mini/exceptions-x86.c
index 9403faba01f..e838fe7fc8d 100644
--- a/src/mono/mono/mini/exceptions-x86.c
+++ b/src/mono/mono/mini/exceptions-x86.c
@@ -243,7 +243,7 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
return res;
}
-void win32_seh_init()
+void win32_seh_init(void)
{
/* install restore stack helper */
if (!restore_stack)
@@ -253,7 +253,7 @@ void win32_seh_init()
mono_win_vectored_exception_handle = AddVectoredExceptionHandler (1, seh_vectored_exception_handler);
}
-void win32_seh_cleanup()
+void win32_seh_cleanup(void)
{
if (mono_old_win_toplevel_exception_filter)
SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
diff --git a/src/mono/mono/mini/jit-icalls.c b/src/mono/mono/mini/jit-icalls.c
index 3bb146b4dc2..b68c4e4a8cc 100644
--- a/src/mono/mono/mini/jit-icalls.c
+++ b/src/mono/mono/mini/jit-icalls.c
@@ -1626,7 +1626,7 @@ mono_throw_method_access (MonoMethod *caller, MonoMethod *callee)
}
void
-mono_throw_bad_image ()
+mono_throw_bad_image (void)
{
ERROR_DECL (error);
mono_error_set_generic_error (error, "System", "BadImageFormatException", "Bad IL format.");
@@ -1634,7 +1634,7 @@ mono_throw_bad_image ()
}
void
-mono_throw_not_supported ()
+mono_throw_not_supported (void)
{
ERROR_DECL (error);
mono_error_set_generic_error (error, "System", "NotSupportedException", "");
@@ -1642,7 +1642,7 @@ mono_throw_not_supported ()
}
void
-mono_throw_platform_not_supported ()
+mono_throw_platform_not_supported (void)
{
ERROR_DECL (error);
mono_error_set_generic_error (error, "System", "PlatformNotSupportedException", "");
diff --git a/src/mono/mono/mini/llvm-jit.cpp b/src/mono/mono/mini/llvm-jit.cpp
index 4f1411258e6..3caa3ef2de9 100644
--- a/src/mono/mono/mini/llvm-jit.cpp
+++ b/src/mono/mono/mini/llvm-jit.cpp
@@ -362,7 +362,7 @@ init_passes_and_options ()
}
void
-mono_llvm_jit_init ()
+mono_llvm_jit_init (void)
{
if (jit != nullptr) return;
@@ -466,7 +466,7 @@ mono_llvm_set_unhandled_exception_handler (void)
}
void
-mono_llvm_jit_init ()
+mono_llvm_jit_init (void)
{
}
diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c
index 5aa0502bc08..c66a227a242 100644
--- a/src/mono/mono/mini/mini-runtime.c
+++ b/src/mono/mono/mini/mini-runtime.c
@@ -5206,7 +5206,7 @@ mono_precompile_assembly (MonoAssembly *ass, void *user_data)
}
}
-void mono_precompile_assemblies ()
+void mono_precompile_assemblies (void)
{
GHashTable *assemblies = g_hash_table_new (NULL, NULL);
diff --git a/src/mono/mono/mini/mini.c b/src/mono/mono/mini/mini.c
index 168d3d3a3c0..6d66a06a554 100644
--- a/src/mono/mono/mini/mini.c
+++ b/src/mono/mono/mini/mini.c
@@ -4050,7 +4050,7 @@ mono_cfg_set_exception_invalid_program (MonoCompile *cfg, const char *msg)
#endif /* DISABLE_JIT */
-gint64 mono_time_track_start ()
+gint64 mono_time_track_start (void)
{
return mono_100ns_ticks ();
}
diff --git a/src/mono/mono/mini/trace.c b/src/mono/mono/mini/trace.c
index ee25dad0e75..4237103c2c8 100644
--- a/src/mono/mono/mini/trace.c
+++ b/src/mono/mono/mini/trace.c
@@ -482,7 +482,7 @@ mono_trace_enable (gboolean enable)
}
gboolean
-mono_trace_is_enabled ()
+mono_trace_is_enabled (void)
{
return trace_spec.enabled;
}
diff --git a/src/mono/mono/sgen/sgen-gc.c b/src/mono/mono/sgen/sgen-gc.c
index ea3102c9832..fcb1acce709 100644
--- a/src/mono/mono/sgen/sgen-gc.c
+++ b/src/mono/mono/sgen/sgen-gc.c
@@ -3920,7 +3920,7 @@ sgen_gc_init (void)
}
gboolean
-sgen_gc_initialized ()
+sgen_gc_initialized (void)
{
return gc_initialized > 0;
}
diff --git a/src/mono/mono/utils/mach-support-amd64.c b/src/mono/mono/utils/mach-support-amd64.c
index efb7460da9e..711e1c15749 100644
--- a/src/mono/mono/utils/mach-support-amd64.c
+++ b/src/mono/mono/utils/mach-support-amd64.c
@@ -23,7 +23,7 @@
#include <mono/arch/amd64/amd64-codegen.h>
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext64);
}
@@ -89,13 +89,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (x86_thread_state64_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (x86_float_state64_t);
}
diff --git a/src/mono/mono/utils/mach-support-arm.c b/src/mono/mono/utils/mach-support-arm.c
index f877fa70500..e08ab58452a 100644
--- a/src/mono/mono/utils/mach-support-arm.c
+++ b/src/mono/mono/utils/mach-support-arm.c
@@ -26,7 +26,7 @@
#endif
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext);
}
@@ -64,13 +64,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (arm_thread_state_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (arm_neon_state_t);
}
diff --git a/src/mono/mono/utils/mach-support-arm64.c b/src/mono/mono/utils/mach-support-arm64.c
index c2e6319052d..97391f9bdb5 100644
--- a/src/mono/mono/utils/mach-support-arm64.c
+++ b/src/mono/mono/utils/mach-support-arm64.c
@@ -26,7 +26,7 @@
#endif
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext64);
}
@@ -81,13 +81,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (arm_unified_thread_state_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (arm_neon_state64_t);
}
diff --git a/src/mono/mono/utils/mach-support-unknown.c b/src/mono/mono/utils/mach-support-unknown.c
index e2fc332191c..b0ff16d387b 100644
--- a/src/mono/mono/utils/mach-support-unknown.c
+++ b/src/mono/mono/utils/mach-support-unknown.c
@@ -18,7 +18,7 @@
#include "mach-support.h"
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
g_assert_not_reached ();
}
@@ -42,13 +42,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
g_assert_not_reached ();
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
g_assert_not_reached ();
}
diff --git a/src/mono/mono/utils/mach-support-x86.c b/src/mono/mono/utils/mach-support-x86.c
index 7810d39f42b..389a8b6ae92 100644
--- a/src/mono/mono/utils/mach-support-x86.c
+++ b/src/mono/mono/utils/mach-support-x86.c
@@ -21,7 +21,7 @@
#include <mono/arch/amd64/amd64-codegen.h>
int
-mono_mach_arch_get_mcontext_size ()
+mono_mach_arch_get_mcontext_size (void)
{
return sizeof (struct __darwin_mcontext32);
}
@@ -71,13 +71,13 @@ mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state
}
int
-mono_mach_arch_get_thread_state_size ()
+mono_mach_arch_get_thread_state_size (void)
{
return sizeof (x86_thread_state32_t);
}
int
-mono_mach_arch_get_thread_fpstate_size ()
+mono_mach_arch_get_thread_fpstate_size (void)
{
return sizeof (x86_float_state32_t);
}
diff --git a/src/mono/mono/utils/mono-cgroup.c b/src/mono/mono/utils/mono-cgroup.c
index 337abbe38b2..0a6c9667887 100644
--- a/src/mono/mono/utils/mono-cgroup.c
+++ b/src/mono/mono/utils/mono-cgroup.c
@@ -96,7 +96,7 @@ static long pageSize;
*
*/
static void
-initialize()
+initialize(void)
{
s_cgroup_version = findCGroupVersion ();
s_memory_cgroup_path = findCGroupPath (s_cgroup_version == 1 ? &isCGroup1MemorySubsystem : NULL);
@@ -202,7 +202,7 @@ getPhysicalMemoryUsage(size_t *val)
*
*/
static int
-findCGroupVersion()
+findCGroupVersion(void)
{
// It is possible to have both cgroup v1 and v2 enabled on a system.
// Most non-bleeding-edge Linux distributions fall in this group. We
@@ -606,7 +606,7 @@ getCGroupMemoryUsage(size_t *val, const char *filename, const char *inactiveFile
* Zero represents no limit.
*/
size_t
-mono_get_restricted_memory_limit()
+mono_get_restricted_memory_limit(void)
{
size_t physical_memory_limit = 0;
@@ -718,7 +718,7 @@ mono_get_memory_used(size_t *val)
*
*/
size_t
-mono_get_memory_avail()
+mono_get_memory_avail(void)
{
size_t max, used, avail, sysAvail;
#ifdef _SC_AVPHYS_PAGES // If this isn't defined then we don't get called
diff --git a/src/mono/mono/utils/mono-log-android.c b/src/mono/mono/utils/mono-log-android.c
index 4a4c4b1932f..fa4f78ec322 100644
--- a/src/mono/mono/utils/mono-log-android.c
+++ b/src/mono/mono/utils/mono-log-android.c
@@ -82,7 +82,7 @@ mono_log_write_logcat (const char *log_domain, GLogLevelFlags level, mono_bool h
* Close access to Android logcat (no-op)
*/
void
-mono_log_close_logcat ()
+mono_log_close_logcat (void)
{
/* No-op on Android */
}
diff --git a/src/mono/mono/utils/mono-log-common.c b/src/mono/mono/utils/mono-log-common.c
index c6f0a4946b1..605df83d4d0 100644
--- a/src/mono/mono/utils/mono-log-common.c
+++ b/src/mono/mono/utils/mono-log-common.c
@@ -151,7 +151,7 @@ mono_log_write_logfile (const char *log_domain, GLogLevelFlags level, mono_bool
* Close the log file
*/
void
-mono_log_close_logfile()
+mono_log_close_logfile(void)
{
if (logFile) {
if (logFile != stdout)
diff --git a/src/mono/mono/utils/mono-log-darwin.c b/src/mono/mono/utils/mono-log-darwin.c
index 039dc8e79d1..ccf8b564e1b 100644
--- a/src/mono/mono/utils/mono-log-darwin.c
+++ b/src/mono/mono/utils/mono-log-darwin.c
@@ -59,7 +59,7 @@ mono_log_write_os_log (const char *log_domain, GLogLevelFlags level, mono_bool h
}
void
-mono_log_close_os_log ()
+mono_log_close_os_log (void)
{
}
diff --git a/src/mono/mono/utils/mono-log-posix.c b/src/mono/mono/utils/mono-log-posix.c
index 98337496c88..267f4a74318 100644
--- a/src/mono/mono/utils/mono-log-posix.c
+++ b/src/mono/mono/utils/mono-log-posix.c
@@ -92,7 +92,7 @@ mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, c
* Close the log file
*/
void
-mono_log_close_syslog()
+mono_log_close_syslog(void)
{
#ifdef HAVE_CLOSELOG
closelog();
diff --git a/src/mono/mono/utils/mono-log-windows.c b/src/mono/mono/utils/mono-log-windows.c
index cd6e8922d76..a9de83745ac 100644
--- a/src/mono/mono/utils/mono-log-windows.c
+++ b/src/mono/mono/utils/mono-log-windows.c
@@ -113,7 +113,7 @@ mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, c
* Close the syslog file
*/
void
-mono_log_close_syslog()
+mono_log_close_syslog(void)
{
if (logFile) {
fclose(logFile);
diff --git a/src/mono/mono/utils/mono-proclib.c b/src/mono/mono/utils/mono-proclib.c
index a683e3d9029..2627c5aa059 100644
--- a/src/mono/mono/utils/mono-proclib.c
+++ b/src/mono/mono/utils/mono-proclib.c
@@ -30,7 +30,7 @@
#endif
int
-mono_process_current_pid ()
+mono_process_current_pid (void)
{
#ifdef HOST_WIN32
return (int) GetCurrentProcessId ();
diff --git a/src/mono/mono/utils/mono-signal-handler.c b/src/mono/mono/utils/mono-signal-handler.c
index 8f0d6481bee..71bf2fd56ee 100644
--- a/src/mono/mono/utils/mono-signal-handler.c
+++ b/src/mono/mono/utils/mono-signal-handler.c
@@ -38,7 +38,7 @@ static struct mono_sigpair *sigpair_buf;
static int sigpair_buflen;
void
-mono_load_signames ()
+mono_load_signames (void)
{
if (sigpair_buf)
return;
diff --git a/src/mono/wasi/mono-wasi-driver/driver.c b/src/mono/wasi/mono-wasi-driver/driver.c
index 80a0339a0df..013fe0538f2 100644
--- a/src/mono/wasi/mono-wasi-driver/driver.c
+++ b/src/mono/wasi/mono-wasi-driver/driver.c
@@ -386,7 +386,7 @@ get_native_to_interp (MonoMethod *method, void *extra_arg)
}
void
-mono_wasm_register_bundled_satellite_assemblies ()
+mono_wasm_register_bundled_satellite_assemblies (void)
{
/* In legacy satellite_assembly_count is always false */
if (satellite_assembly_count) {
@@ -795,4 +795,4 @@ MonoMethod* lookup_dotnet_method(const char* assembly_name, const char* namespac
MonoMethod* method = mono_wasm_assembly_find_method (class, method_name, num_params);
assert (method);
return method;
-} \ No newline at end of file
+}
diff --git a/src/mono/wasi/mono-wasi-driver/stubs.c b/src/mono/wasi/mono-wasi-driver/stubs.c
index 6c09722ee99..b5978c9c0e7 100644
--- a/src/mono/wasi/mono-wasi-driver/stubs.c
+++ b/src/mono/wasi/mono-wasi-driver/stubs.c
@@ -14,7 +14,7 @@ int sem_timedwait (int *sem, void *abs_timeout) { assert(0); return 0; }
int __errno_location() { return 0; }
-void mono_log_close_syslog () { assert(0); }
+void mono_log_close_syslog (void) { assert(0); }
void mono_log_open_syslog (const char *a, void *b) { assert(0); }
void mono_log_write_syslog (const char *a, int b, int c, const char *d) { assert(0); }
diff --git a/src/mono/wasm/runtime/corebindings.c b/src/mono/wasm/runtime/corebindings.c
index c9ebdc01abd..d1b5a9e6842 100644
--- a/src/mono/wasm/runtime/corebindings.c
+++ b/src/mono/wasm/runtime/corebindings.c
@@ -35,7 +35,7 @@ extern void mono_wasm_bind_cs_function(MonoString **fully_qualified_name, int si
extern void mono_wasm_marshal_promise(void *data);
-void core_initialize_internals ()
+void core_initialize_internals (void)
{
mono_add_internal_call ("Interop/Runtime::InvokeJSWithArgsRef", mono_wasm_invoke_js_with_args_ref);
mono_add_internal_call ("Interop/Runtime::GetObjectPropertyRef", mono_wasm_get_object_property_ref);
diff --git a/src/mono/wasm/runtime/driver.c b/src/mono/wasm/runtime/driver.c
index e2db123f7ab..b14e341f6c8 100644
--- a/src/mono/wasm/runtime/driver.c
+++ b/src/mono/wasm/runtime/driver.c
@@ -452,7 +452,7 @@ get_native_to_interp (MonoMethod *method, void *extra_arg)
typedef void (*background_job_cb)(void);
void mono_threads_schedule_background_job (background_job_cb cb);
-void mono_initialize_internals ()
+void mono_initialize_internals (void)
{
// Blazor specific custom routines - see dotnet_support.js for backing code
mono_add_internal_call ("WebAssembly.JSInterop.InternalCalls::InvokeJS", mono_wasm_invoke_js_blazor);
@@ -465,7 +465,7 @@ void mono_initialize_internals ()
}
EMSCRIPTEN_KEEPALIVE void
-mono_wasm_register_bundled_satellite_assemblies ()
+mono_wasm_register_bundled_satellite_assemblies (void)
{
/* In legacy satellite_assembly_count is always false */
if (satellite_assembly_count) {
@@ -641,7 +641,7 @@ mono_wasm_assembly_load (const char *name)
}
EMSCRIPTEN_KEEPALIVE MonoAssembly*
-mono_wasm_get_corlib ()
+mono_wasm_get_corlib (void)
{
MonoAssembly* result;
MONO_ENTER_GC_UNSAFE;
@@ -912,7 +912,7 @@ _get_uri_class(MonoException** exc)
}
static void
-_ensure_classes_resolved ()
+_ensure_classes_resolved (void)
{
MONO_ENTER_GC_UNSAFE;
if (!datetime_class && !resolved_datetime_class) {
diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt
index 11d3799129b..26ff71928ff 100644
--- a/src/native/libs/CMakeLists.txt
+++ b/src/native/libs/CMakeLists.txt
@@ -150,7 +150,6 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER)
add_compile_options(-Wno-typedef-redefinition)
add_compile_options(-Wno-c11-extensions)
add_compile_options(-Wno-thread-safety-analysis)
- add_compile_options(-Wno-strict-prototypes)
endif ()
add_subdirectory(System.Native)
diff --git a/src/native/libs/System.Globalization.Native/pal_calendarData.c b/src/native/libs/System.Globalization.Native/pal_calendarData.c
index 0b234ac7800..bc47e3326af 100644
--- a/src/native/libs/System.Globalization.Native/pal_calendarData.c
+++ b/src/native/libs/System.Globalization.Native/pal_calendarData.c
@@ -549,7 +549,7 @@ GetLatestJapaneseEra
Gets the latest era in the Japanese calendar.
*/
-int32_t GlobalizationNative_GetLatestJapaneseEra()
+int32_t GlobalizationNative_GetLatestJapaneseEra(void)
{
UErrorCode err = U_ZERO_ERROR;
UCalendar* pCal = ucal_open(NULL, 0, JAPANESE_LOCALE_AND_CALENDAR, UCAL_TRADITIONAL, &err);
diff --git a/src/native/libs/System.Globalization.Native/pal_icushim.c b/src/native/libs/System.Globalization.Native/pal_icushim.c
index d23499c80b1..bfb2a1c52bc 100644
--- a/src/native/libs/System.Globalization.Native/pal_icushim.c
+++ b/src/native/libs/System.Globalization.Native/pal_icushim.c
@@ -95,7 +95,7 @@ static int FindSymbolVersion(int majorVer, int minorVer, int subVer, char* symbo
fn##_ptr = (TYPEOF(fn)*)GetProcAddress((HMODULE)lib, symbolName); \
if (fn##_ptr == NULL && required) { fprintf(stderr, "Cannot get symbol %s from " #lib "\nError: %u\n", symbolName, GetLastError()); abort(); }
-static int FindICULibs()
+static int FindICULibs(void)
{
libicuuc = LoadLibraryExW(L"icu.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if (libicuuc == NULL)
@@ -157,7 +157,7 @@ static int FindSymbolVersion(int majorVer, int minorVer, int subVer, char* symbo
#elif defined(TARGET_OSX)
-static int FindICULibs()
+static int FindICULibs(void)
{
#ifndef OSX_ICU_LIBRARY_PATH
c_static_assert_msg(false, "The ICU Library path is not defined");
@@ -448,7 +448,7 @@ static void InitializeVariableMaxAndTopPointers(char* symbolVersion)
// This method get called from the managed side during the globalization initialization.
// This method shouldn't get called at all if we are running in globalization invariant mode
// return 0 if failed to load ICU and 1 otherwise
-int32_t GlobalizationNative_LoadICU()
+int32_t GlobalizationNative_LoadICU(void)
{
char symbolName[SYMBOL_NAME_SIZE];
char symbolVersion[MaxICUVersionStringLength + 1]="";
@@ -545,7 +545,7 @@ void GlobalizationNative_InitICUFunctions(void* icuuc, void* icuin, const char*
// GlobalizationNative_GetICUVersion
// return the current loaded ICU version
-int32_t GlobalizationNative_GetICUVersion()
+int32_t GlobalizationNative_GetICUVersion(void)
{
if (u_getVersion_ptr == NULL)
return 0;
diff --git a/src/native/libs/System.Globalization.Native/pal_locale.c b/src/native/libs/System.Globalization.Native/pal_locale.c
index 498f713404c..eada9f12ddd 100644
--- a/src/native/libs/System.Globalization.Native/pal_locale.c
+++ b/src/native/libs/System.Globalization.Native/pal_locale.c
@@ -134,7 +134,7 @@ int32_t FixupLocaleName(UChar* value, int32_t valueLength)
// On Apple related platforms (OSX, iOS, tvOS, MacCatalyst), we'll take what the system locale is.
// On all other platforms we'll map this POSIX locale to Invariant instead.
// The reason is POSIX locale collation behavior is not desirable at all because it doesn't support case insensitive string comparisons.
-const char* DetectDefaultLocaleName()
+const char* DetectDefaultLocaleName(void)
{
const char* icuLocale = uloc_getDefault();
diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt
index f4d2e315f49..ef548406e4d 100644
--- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt
+++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt
@@ -35,12 +35,12 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER)
set(NATIVECOMPRESSION_SOURCES ${ZLIB_SOURCES} ${NATIVECOMPRESSION_SOURCES})
endif()
- # Disable implicit fallthrough warning for Brotli
+ # Disable implicit fallthrough warning for Zlib and Brotli
set(FLAGS -Wno-implicit-fallthrough)
- if (CMAKE_C_COMPILER_ID STREQUAL Clang)
- add_compile_options(-Wno-strict-prototypes)
- endif ()
+ # Disable no strict prototypes warning for Zlib
+ # https://github.com/madler/zlib/issues/633
+ set(FLAGS "${FLAGS} -Wno-strict-prototypes")
# Delete this suppression once brotli is upgraded to vNext (current latest v1.0.9
# does not contain upstream fix: https://github.com/google/brotli/commit/0a3944c)
diff --git a/src/native/libs/System.Native/pal_console.c b/src/native/libs/System.Native/pal_console.c
index b8e9051593c..5e13eb7b627 100644
--- a/src/native/libs/System.Native/pal_console.c
+++ b/src/native/libs/System.Native/pal_console.c
@@ -46,7 +46,7 @@ int32_t SystemNative_IsATty(intptr_t fd)
static char* g_keypadXmit = NULL; // string used to enable application mode, from terminfo
-static void WriteKeypadXmit()
+static void WriteKeypadXmit(void)
{
// If a terminfo "application mode" keypad_xmit string has been supplied,
// write it out to the terminal to enter the mode.
@@ -97,7 +97,7 @@ static bool g_hasTty = false; // cache we are not a tty
static volatile bool g_receivedSigTtou = false;
-static void ttou_handler()
+static void ttou_handler(void)
{
g_receivedSigTtou = true;
}
@@ -198,7 +198,7 @@ static bool ConfigureTerminal(bool signalForBreak, bool forChild, uint8_t minCha
return TcSetAttr(&termios, blockIfBackground);
}
-void UninitializeTerminal()
+void UninitializeTerminal(void)
{
// This method is called on SIGQUIT/SIGINT from the signal dispatching thread
// and on atexit.
@@ -232,7 +232,7 @@ void SystemNative_InitializeConsoleBeforeRead(int32_t distinguishNewLines, uint8
}
}
-void SystemNative_UninitializeConsoleAfterRead()
+void SystemNative_UninitializeConsoleAfterRead(void)
{
if (pthread_mutex_lock(&g_lock) == 0)
{
@@ -397,7 +397,7 @@ int32_t SystemNative_ReadStdin(void* buffer, int32_t bufferSize)
return (int32_t)count;
}
-int32_t SystemNative_GetSignalForBreak()
+int32_t SystemNative_GetSignalForBreak(void)
{
return g_signalForBreak;
}
@@ -422,7 +422,7 @@ int32_t SystemNative_SetSignalForBreak(int32_t signalForBreak, int32_t distingui
return rv;
}
-void ReinitializeTerminal()
+void ReinitializeTerminal(void)
{
// Restores the state of the terminal after being suspended.
// pal_signal.cpp calls this on SIGCONT from the signal handling thread.
@@ -443,7 +443,7 @@ void ReinitializeTerminal()
}
}
-static void InitializeTerminalCore()
+static void InitializeTerminalCore(void)
{
bool haveInitTermios = tcgetattr(STDIN_FILENO, &g_initTermios) >= 0;
@@ -462,7 +462,7 @@ static void InitializeTerminalCore()
}
}
-int32_t SystemNative_InitializeTerminalAndSignalHandling()
+int32_t SystemNative_InitializeTerminalAndSignalHandling(void)
{
static int32_t initialized = 0;
diff --git a/src/native/libs/System.Native/pal_datetime.c b/src/native/libs/System.Native/pal_datetime.c
index 3832114b4eb..73c0a2583e4 100644
--- a/src/native/libs/System.Native/pal_datetime.c
+++ b/src/native/libs/System.Native/pal_datetime.c
@@ -23,7 +23,7 @@ static const int64_t TICKS_PER_MICROSECOND = 10; /* 1000 / 100 */
// SystemNative_GetSystemTimeAsTicks return the system time as ticks (100 nanoseconds)
// since 00:00 01 January 1970 UTC (Unix epoch)
//
-int64_t SystemNative_GetSystemTimeAsTicks()
+int64_t SystemNative_GetSystemTimeAsTicks(void)
{
#if HAVE_CLOCK_REALTIME
struct timespec time;
@@ -43,7 +43,7 @@ int64_t SystemNative_GetSystemTimeAsTicks()
}
#if defined(TARGET_ANDROID)
-char* SystemNative_GetDefaultTimeZone()
+char* SystemNative_GetDefaultTimeZone(void)
{
char defaulttimezone[PROP_VALUE_MAX];
if (__system_property_get("persist.sys.timezone", defaulttimezone))
diff --git a/src/native/libs/System.Native/pal_environment.c b/src/native/libs/System.Native/pal_environment.c
index fd9e68f0230..76ad3a807ee 100644
--- a/src/native/libs/System.Native/pal_environment.c
+++ b/src/native/libs/System.Native/pal_environment.c
@@ -15,7 +15,7 @@ char* SystemNative_GetEnv(const char* variable)
return getenv(variable);
}
-char** SystemNative_GetEnviron()
+char** SystemNative_GetEnviron(void)
{
#if HAVE_NSGETENVIRON
return *(_NSGetEnviron());
diff --git a/src/native/libs/System.Native/pal_io.c b/src/native/libs/System.Native/pal_io.c
index 7f775ff8869..9332b46bb28 100644
--- a/src/native/libs/System.Native/pal_io.c
+++ b/src/native/libs/System.Native/pal_io.c
@@ -1215,7 +1215,7 @@ static ssize_t CopyFileRange(int inFd, int outFd, size_t len)
return syscall(__NR_copy_file_range, inFd, NULL, outFd, NULL, len, 0);
}
-static bool SupportsCopyFileRange()
+static bool SupportsCopyFileRange(void)
{
static volatile int s_isSupported = 0;
diff --git a/src/native/libs/System.Native/pal_networkstatistics.c b/src/native/libs/System.Native/pal_networkstatistics.c
index 6066cae821e..987a0a80d81 100644
--- a/src/native/libs/System.Native/pal_networkstatistics.c
+++ b/src/native/libs/System.Native/pal_networkstatistics.c
@@ -341,7 +341,7 @@ int32_t SystemNative_GetIcmpv6GlobalStatistics(Icmpv6GlobalStatistics* retStats)
return 0;
}
-int32_t SystemNative_GetEstimatedTcpConnectionCount()
+int32_t SystemNative_GetEstimatedTcpConnectionCount(void)
{
int32_t count;
size_t oldlenp = sizeof(count);
@@ -455,7 +455,7 @@ int32_t SystemNative_GetActiveTcpConnectionInfos(NativeTcpConnectionInformation*
return 0;
}
-int32_t SystemNative_GetEstimatedUdpListenerCount()
+int32_t SystemNative_GetEstimatedUdpListenerCount(void)
{
int32_t count;
size_t oldlenp = sizeof(count);
@@ -702,7 +702,7 @@ int32_t SystemNative_GetNativeIPInterfaceStatistics(char* interfaceName, NativeI
memset(retStats, 0, sizeof(NativeIPInterfaceStatistics));
return -1;
}
-int32_t SystemNative_GetNumRoutes()
+int32_t SystemNative_GetNumRoutes(void)
{
int32_t count = 0;
#if HAVE_RT_MSGHDR2
diff --git a/src/native/libs/System.Native/pal_process.c b/src/native/libs/System.Native/pal_process.c
index a94d268d324..509049b2fdc 100644
--- a/src/native/libs/System.Native/pal_process.c
+++ b/src/native/libs/System.Native/pal_process.c
@@ -660,7 +660,7 @@ int32_t SystemNative_Kill(int32_t pid, int32_t signal)
return kill(pid, signal);
}
-int32_t SystemNative_GetPid()
+int32_t SystemNative_GetPid(void)
{
return getpid();
}
@@ -675,7 +675,7 @@ void SystemNative_SysLog(SysLogPriority priority, const char* message, const cha
syslog((int)(LOG_USER | priority), message, arg1);
}
-int32_t SystemNative_WaitIdAnyExitedNoHangNoWait()
+int32_t SystemNative_WaitIdAnyExitedNoHangNoWait(void)
{
siginfo_t siginfo;
memset(&siginfo, 0, sizeof(siginfo));
@@ -874,7 +874,7 @@ int32_t SystemNative_SchedGetAffinity(int32_t pid, intptr_t* mask)
}
#endif
-char* SystemNative_GetProcessPath()
+char* SystemNative_GetProcessPath(void)
{
return minipal_getexepath();
}
diff --git a/src/native/libs/System.Native/pal_runtimeinformation.c b/src/native/libs/System.Native/pal_runtimeinformation.c
index 24446c9e8e3..aa18e7000d1 100644
--- a/src/native/libs/System.Native/pal_runtimeinformation.c
+++ b/src/native/libs/System.Native/pal_runtimeinformation.c
@@ -16,7 +16,7 @@
#include <sys/systeminfo.h>
#endif
-char* SystemNative_GetUnixRelease()
+char* SystemNative_GetUnixRelease(void)
{
#if defined(TARGET_ANDROID)
// get the Android API level
@@ -68,7 +68,7 @@ enum
ARCH_RISCV64,
};
-int32_t SystemNative_GetOSArchitecture()
+int32_t SystemNative_GetOSArchitecture(void)
{
#ifdef TARGET_WASM
return ARCH_WASM;
diff --git a/src/native/libs/System.Native/pal_searchpath.c b/src/native/libs/System.Native/pal_searchpath.c
index de8037dc1a2..10bf9c77c00 100644
--- a/src/native/libs/System.Native/pal_searchpath.c
+++ b/src/native/libs/System.Native/pal_searchpath.c
@@ -11,7 +11,7 @@ const char* SystemNative_SearchPath(int32_t folderId)
return NULL;
}
-const char* SystemNative_SearchPath_TempDirectory()
+const char* SystemNative_SearchPath_TempDirectory(void)
{
__builtin_unreachable();
return NULL;
diff --git a/src/native/libs/System.Native/pal_signal.c b/src/native/libs/System.Native/pal_signal.c
index 88f43fac502..257969dc67a 100644
--- a/src/native/libs/System.Native/pal_signal.c
+++ b/src/native/libs/System.Native/pal_signal.c
@@ -40,7 +40,7 @@ static int g_signalPipe[2] = {-1, -1}; // Pipe used between signal handler and w
static pid_t g_pid;
-static int GetSignalMax() // Returns the highest usable signal number.
+static int GetSignalMax(void) // Returns the highest usable signal number.
{
#ifdef SIGRTMAX
return SIGRTMAX;
@@ -409,7 +409,7 @@ static void* SignalHandlerLoop(void* arg)
}
}
-static void CloseSignalHandlingPipe()
+static void CloseSignalHandlingPipe(void)
{
assert(g_signalPipe[0] >= 0);
assert(g_signalPipe[1] >= 0);
@@ -548,7 +548,7 @@ static bool CreateSignalHandlerThread(int* readFdPtr)
return success;
}
-int32_t InitializeSignalHandlingCore()
+int32_t InitializeSignalHandlingCore(void)
{
size_t signalMax = (size_t)GetSignalMax();
g_origSigHandler = (struct sigaction*)calloc(sizeof(struct sigaction), signalMax);
@@ -700,7 +700,7 @@ void UninstallTTOUHandlerForConsole(void)
#ifndef HAS_CONSOLE_SIGNALS
-int32_t SystemNative_InitializeTerminalAndSignalHandling()
+int32_t SystemNative_InitializeTerminalAndSignalHandling(void)
{
static int32_t initialized = 0;
diff --git a/src/native/libs/System.Native/pal_threading.c b/src/native/libs/System.Native/pal_threading.c
index c8c7148fafc..b524327ef82 100644
--- a/src/native/libs/System.Native/pal_threading.c
+++ b/src/native/libs/System.Native/pal_threading.c
@@ -48,7 +48,7 @@ static void SetIsLocked(LowLevelMonitor* monitor, bool isLocked)
#endif
}
-LowLevelMonitor* SystemNative_LowLevelMonitor_Create()
+LowLevelMonitor* SystemNative_LowLevelMonitor_Create(void)
{
LowLevelMonitor* monitor = (LowLevelMonitor *)malloc(sizeof(LowLevelMonitor));
if (monitor == NULL)
@@ -265,7 +265,7 @@ CreateThreadExit:
return result;
}
-int32_t SystemNative_SchedGetCpu()
+int32_t SystemNative_SchedGetCpu(void)
{
#if HAVE_SCHED_GETCPU
return sched_getcpu();
@@ -281,7 +281,7 @@ void SystemNative_Exit(int32_t exitCode)
}
__attribute__((noreturn))
-void SystemNative_Abort()
+void SystemNative_Abort(void)
{
abort();
}
diff --git a/src/native/libs/System.Native/pal_time.c b/src/native/libs/System.Native/pal_time.c
index 4a7bbeca4d5..04ffd55865d 100644
--- a/src/native/libs/System.Native/pal_time.c
+++ b/src/native/libs/System.Native/pal_time.c
@@ -81,7 +81,7 @@ int32_t SystemNative_FUTimens(intptr_t fd, TimeSpec* times)
return result;
}
-uint64_t SystemNative_GetTimestamp()
+uint64_t SystemNative_GetTimestamp(void)
{
#if HAVE_CLOCK_GETTIME_NSEC_NP
return clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
@@ -96,7 +96,7 @@ uint64_t SystemNative_GetTimestamp()
#endif
}
-int64_t SystemNative_GetBootTimeTicks()
+int64_t SystemNative_GetBootTimeTicks(void)
{
#if defined(TARGET_LINUX) || defined(TARGET_ANDROID)
struct timespec ts;
diff --git a/src/native/libs/System.Native/pal_uid.c b/src/native/libs/System.Native/pal_uid.c
index df921de926a..0f94484cafe 100644
--- a/src/native/libs/System.Native/pal_uid.c
+++ b/src/native/libs/System.Native/pal_uid.c
@@ -88,12 +88,12 @@ int32_t SystemNative_GetPwNamR(const char* name, Passwd* pwd, char* buf, int32_t
return ConvertNativePasswdToPalPasswd(error, &nativePwd, result, pwd);
}
-uint32_t SystemNative_GetEUid()
+uint32_t SystemNative_GetEUid(void)
{
return geteuid();
}
-uint32_t SystemNative_GetEGid()
+uint32_t SystemNative_GetEGid(void)
{
return getegid();
}
diff --git a/src/native/libs/System.Net.Security.Native/pal_gssapi.c b/src/native/libs/System.Net.Security.Native/pal_gssapi.c
index a325b1ac5ae..97888682e43 100644
--- a/src/native/libs/System.Net.Security.Native/pal_gssapi.c
+++ b/src/native/libs/System.Net.Security.Native/pal_gssapi.c
@@ -119,7 +119,7 @@ static void* volatile s_gssLib = NULL;
#define gss_lib_name "libgssapi_krb5.so.2"
-static int32_t ensure_gss_shim_initialized()
+static int32_t ensure_gss_shim_initialized(void)
{
void* lib = dlopen(gss_lib_name, RTLD_LAZY);
if (lib == NULL) { fprintf(stderr, "Cannot load library %s \nError: %s\n", gss_lib_name, dlerror()); return -1; }
@@ -673,7 +673,7 @@ uint32_t NetSecurityNative_InitiateCredWithPassword(uint32_t* minorStatus,
minorStatus, packageType, desiredName, password, passwdLen, GSS_C_INITIATE, outputCredHandle);
}
-uint32_t NetSecurityNative_IsNtlmInstalled()
+uint32_t NetSecurityNative_IsNtlmInstalled(void)
{
#if HAVE_GSS_SPNEGO_MECHANISM
gss_OID ntlmOid = GSS_NTLM_MECHANISM;
@@ -706,7 +706,7 @@ uint32_t NetSecurityNative_IsNtlmInstalled()
return foundNtlm;
}
-int32_t NetSecurityNative_EnsureGssInitialized()
+int32_t NetSecurityNative_EnsureGssInitialized(void)
{
#if defined(GSS_SHIM)
return ensure_gss_shim_initialized();
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c
index 648e22ee6aa..e5f7ed31904 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_err.c
@@ -3,7 +3,7 @@
#include "pal_err.h"
-void CryptoNative_ErrClearError()
+void CryptoNative_ErrClearError(void)
{
}
@@ -12,12 +12,12 @@ uint64_t CryptoNative_ErrGetErrorAlloc(int32_t* isAllocFailure)
return 0;
}
-uint64_t CryptoNative_ErrPeekError()
+uint64_t CryptoNative_ErrPeekError(void)
{
return 0;
}
-uint64_t CryptoNative_ErrPeekLastError()
+uint64_t CryptoNative_ErrPeekLastError(void)
{
return 0;
}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c
index 04ff98209b0..03118dfbb64 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_evp.c
@@ -4,11 +4,11 @@
#include "pal_evp.h"
// just some unique IDs
-intptr_t CryptoNative_EvpMd5() { return 101; }
-intptr_t CryptoNative_EvpSha1() { return 102; }
-intptr_t CryptoNative_EvpSha256() { return 103; }
-intptr_t CryptoNative_EvpSha384() { return 104; }
-intptr_t CryptoNative_EvpSha512() { return 105; }
+intptr_t CryptoNative_EvpMd5(void) { return 101; }
+intptr_t CryptoNative_EvpSha1(void) { return 102; }
+intptr_t CryptoNative_EvpSha256(void) { return 103; }
+intptr_t CryptoNative_EvpSha384(void) { return 104; }
+intptr_t CryptoNative_EvpSha512(void) { return 105; }
int32_t CryptoNative_EvpMdSize(intptr_t md)
{
@@ -21,7 +21,7 @@ int32_t CryptoNative_EvpMdSize(intptr_t md)
return -1;
}
-int32_t CryptoNative_GetMaxMdSize()
+int32_t CryptoNative_GetMaxMdSize(void)
{
return EVP_MAX_MD_SIZE;
}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
index 0c4c732b44e..f61d91060e8 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
@@ -619,12 +619,12 @@ static pthread_key_t threadLocalEnvKey;
static pthread_once_t threadLocalEnvInitKey = PTHREAD_ONCE_INIT;
static void
-make_key()
+make_key(void)
{
(void) pthread_key_create(&threadLocalEnvKey, &DetachThreadFromJNI);
}
-JNIEnv* GetJNIEnv()
+JNIEnv* GetJNIEnv(void)
{
JNIEnv *env = NULL;
(*gJvm)->GetEnv(gJvm, (void**)&env, JNI_VERSION_1_6);
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c
index 4f9e374b8e2..67d3737561e 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_misc.c
@@ -4,7 +4,7 @@
#include "pal_misc.h"
#include "pal_jni.h"
-int32_t CryptoNative_EnsureOpenSslInitialized()
+int32_t CryptoNative_EnsureOpenSslInitialized(void)
{
return 0;
}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c b/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c
index e212812b2d7..f1fd65f4daf 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Android/pal_rsa.c
@@ -54,7 +54,7 @@ static jobject GetRsaOaepPadding(JNIEnv* env, RsaPadding padding)
return CheckJNIExceptions(env) ? FAIL : oaepParameterSpec;
}
-PALEXPORT RSA* AndroidCryptoNative_RsaCreate()
+PALEXPORT RSA* AndroidCryptoNative_RsaCreate(void)
{
RSA* rsa = xcalloc(1, sizeof(RSA));
atomic_init(&rsa->refCount, 1);
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c
index f0adc55eeca..3f43c5c1b78 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_ssl.c
@@ -660,9 +660,9 @@ PALEXPORT int32_t AppleCryptoNative_SslSetCertificateAuthorities(SSLContextRef s
#pragma clang diagnostic pop
}
-__attribute__((constructor)) static void InitializeAppleCryptoSslShim()
+__attribute__((constructor)) static void InitializeAppleCryptoSslShim(void)
{
SSLSetCertificateAuthoritiesPtr = (OSStatus(*)(SSLContextRef, CFArrayRef, int32_t))dlsym(RTLD_DEFAULT, "SSLSetCertificateAuthorities");
SSLSetALPNProtocolsPtr = (OSStatus(*)(SSLContextRef, CFArrayRef))dlsym(RTLD_DEFAULT, "SSLSetALPNProtocols");
SSLCopyALPNProtocolsPtr = (OSStatus(*)(SSLContextRef, CFArrayRef*))dlsym(RTLD_DEFAULT, "SSLCopyALPNProtocols");
-} \ No newline at end of file
+}
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c
index 0b6d1f889bc..d2d8a11554e 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509.c
@@ -43,7 +43,7 @@ AppleCryptoNative_X509DemuxAndRetainHandle(CFTypeRef handle, SecCertificateRef*
}
#if !defined(TARGET_MACCATALYST)
-static void InitCertificateCopy()
+static void InitCertificateCopy(void)
{
#if defined(TARGET_IOS) || defined(TARGET_TVOS)
// SecCertificateCopyPublicKey on iOS/tvOS has same function prototype as SecCertificateCopyKey
diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c
index 06f09cfd9f4..152ed890ed6 100644
--- a/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c
+++ b/src/native/libs/System.Security.Cryptography.Native.Apple/pal_x509chain.c
@@ -3,12 +3,12 @@
#include "pal_x509chain.h"
-SecPolicyRef AppleCryptoNative_X509ChainCreateDefaultPolicy()
+SecPolicyRef AppleCryptoNative_X509ChainCreateDefaultPolicy(void)
{
return SecPolicyCreateBasicX509();
}
-SecPolicyRef AppleCryptoNative_X509ChainCreateRevocationPolicy()
+SecPolicyRef AppleCryptoNative_X509ChainCreateRevocationPolicy(void)
{
return SecPolicyCreateRevocation(kSecRevocationUseAnyAvailableMethod | kSecRevocationRequirePositiveResponse);
}
diff --git a/src/native/libs/System.Security.Cryptography.Native/apibridge.c b/src/native/libs/System.Security.Cryptography.Native/apibridge.c
index e6d3c1ff7c0..8077a1e2bb6 100644
--- a/src/native/libs/System.Security.Cryptography.Native/apibridge.c
+++ b/src/native/libs/System.Security.Cryptography.Native/apibridge.c
@@ -182,7 +182,7 @@ int32_t local_X509_NAME_get0_der(X509_NAME* x509Name, const uint8_t** pder, size
return 1;
}
-long local_OpenSSL_version_num()
+long local_OpenSSL_version_num(void)
{
return (long)SSLeay();
}
@@ -325,7 +325,7 @@ int32_t local_EVP_PKEY_up_ref(EVP_PKEY* pkey)
return CRYPTO_add_lock(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY, __FILE__, __LINE__) > 1;
}
-EVP_CIPHER_CTX* local_EVP_CIPHER_CTX_new()
+EVP_CIPHER_CTX* local_EVP_CIPHER_CTX_new(void)
{
EVP_CIPHER_CTX* ctx = (EVP_CIPHER_CTX*)calloc(1, sizeof(EVP_CIPHER_CTX));
return ctx;
@@ -353,7 +353,7 @@ void local_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX* ctx)
}
}
-HMAC_CTX* local_HMAC_CTX_new()
+HMAC_CTX* local_HMAC_CTX_new(void)
{
HMAC_CTX* ctx = (HMAC_CTX*)calloc(1, sizeof(HMAC_CTX));
diff --git a/src/native/libs/System.Security.Cryptography.Native/openssl.c b/src/native/libs/System.Security.Cryptography.Native/openssl.c
index c0822ab1cb4..ba713b6fdcc 100644
--- a/src/native/libs/System.Security.Cryptography.Native/openssl.c
+++ b/src/native/libs/System.Security.Cryptography.Native/openssl.c
@@ -1048,7 +1048,7 @@ of X509* to OpenSSL.
Return values:
A STACK_OF(X509*) with no comparator.
*/
-STACK_OF(X509) * CryptoNative_NewX509Stack()
+STACK_OF(X509) * CryptoNative_NewX509Stack(void)
{
ERR_clear_error();
return sk_X509_new_null();
@@ -1173,7 +1173,7 @@ Gets the version of openssl library.
Return values:
Version number as MNNFFRBB (major minor fix final beta/patch)
*/
-int64_t CryptoNative_OpenSslVersionNumber()
+int64_t CryptoNative_OpenSslVersionNumber(void)
{
// No error queue impact.
return (int64_t)OpenSSL_version_num();
@@ -1243,7 +1243,7 @@ static int ExDataDup(
return 1;
}
-void CryptoNative_RegisterLegacyAlgorithms()
+void CryptoNative_RegisterLegacyAlgorithms(void)
{
#ifdef NEED_OPENSSL_3_0
if (API_EXISTS(OSSL_PROVIDER_try_load))
@@ -1308,7 +1308,7 @@ Return values:
0 on success
non-zero on failure
*/
-static int32_t EnsureOpenSsl10Initialized()
+static int32_t EnsureOpenSsl10Initialized(void)
{
int ret = 0;
int numLocks = 0;
@@ -1408,7 +1408,7 @@ done:
pthread_mutex_t g_err_mutex = PTHREAD_MUTEX_INITIALIZER;
int volatile g_err_unloaded = 0;
-static void HandleShutdown()
+static void HandleShutdown(void)
{
// Generally, a mutex to set a boolean is overkill, but this lock
// ensures that there are no callers already inside the string table
@@ -1422,7 +1422,7 @@ static void HandleShutdown()
assert(!result && "Releasing the error string table mutex failed.");
}
-static int32_t EnsureOpenSsl11Initialized()
+static int32_t EnsureOpenSsl11Initialized(void)
{
// In OpenSSL 1.0 we call OPENSSL_add_all_algorithms_conf() and ERR_load_crypto_strings(),
// so do the same for 1.1
@@ -1450,7 +1450,7 @@ static int32_t EnsureOpenSsl11Initialized()
#endif
-int32_t CryptoNative_OpenSslAvailable()
+int32_t CryptoNative_OpenSslAvailable(void)
{
#ifdef FEATURE_DISTRO_AGNOSTIC_SSL
// OpenLibrary will attempt to open libssl. DlOpen will handle
@@ -1464,7 +1464,7 @@ int32_t CryptoNative_OpenSslAvailable()
static int32_t g_initStatus = 1;
int g_x509_ocsp_index = -1;
-static int32_t EnsureOpenSslInitializedCore()
+static int32_t EnsureOpenSslInitializedCore(void)
{
int ret = 0;
@@ -1498,14 +1498,14 @@ static int32_t EnsureOpenSslInitializedCore()
return ret;
}
-static void EnsureOpenSslInitializedOnce()
+static void EnsureOpenSslInitializedOnce(void)
{
g_initStatus = EnsureOpenSslInitializedCore();
}
static pthread_once_t g_initializeShim = PTHREAD_ONCE_INIT;
-int32_t CryptoNative_EnsureOpenSslInitialized()
+int32_t CryptoNative_EnsureOpenSslInitialized(void)
{
pthread_once(&g_initializeShim, EnsureOpenSslInitializedOnce);
return g_initStatus;
diff --git a/src/native/libs/System.Security.Cryptography.Native/opensslshim.c b/src/native/libs/System.Security.Cryptography.Native/opensslshim.c
index 35949f4b94e..d21d6273410 100644
--- a/src/native/libs/System.Security.Cryptography.Native/opensslshim.c
+++ b/src/native/libs/System.Security.Cryptography.Native/opensslshim.c
@@ -52,7 +52,7 @@ static void DlOpen(const char* libraryName)
}
}
-static void OpenLibraryOnce()
+static void OpenLibraryOnce(void)
{
// If there is an override of the version specified using the CLR_OPENSSL_VERSION_OVERRIDE
// env variable, try to load that first.
@@ -131,7 +131,7 @@ static void OpenLibraryOnce()
static pthread_once_t g_openLibrary = PTHREAD_ONCE_INIT;
-int OpenLibrary()
+int OpenLibrary(void)
{
pthread_once(&g_openLibrary, OpenLibraryOnce);
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c b/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c
index 32661cf31dc..e47f1c80fac 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_asn1.c
@@ -78,7 +78,7 @@ void CryptoNative_Asn1BitStringFree(ASN1_STRING* a)
ASN1_BIT_STRING_free(a);
}
-ASN1_OCTET_STRING* CryptoNative_Asn1OctetStringNew()
+ASN1_OCTET_STRING* CryptoNative_Asn1OctetStringNew(void)
{
ERR_clear_error();
return ASN1_OCTET_STRING_new();
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_bio.c b/src/native/libs/System.Security.Cryptography.Native/pal_bio.c
index 0c349664b23..f0a4ce45d06 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_bio.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_bio.c
@@ -5,7 +5,7 @@
#include <assert.h>
-BIO* CryptoNative_CreateMemoryBio()
+BIO* CryptoNative_CreateMemoryBio(void)
{
ERR_clear_error();
return BIO_new(BIO_s_mem());
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_err.c b/src/native/libs/System.Security.Cryptography.Native/pal_err.c
index da0dc6fd2a8..5c197bdecf1 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_err.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_err.c
@@ -4,7 +4,7 @@
#include "pal_err.h"
#include "pal_utilities.h"
-void CryptoNative_ErrClearError()
+void CryptoNative_ErrClearError(void)
{
ERR_clear_error();
}
@@ -23,12 +23,12 @@ uint64_t CryptoNative_ErrGetExceptionError(int32_t* isAllocFailure)
return err;
}
-uint64_t CryptoNative_ErrPeekError()
+uint64_t CryptoNative_ErrPeekError(void)
{
return ERR_peek_error();
}
-uint64_t CryptoNative_ErrPeekLastError()
+uint64_t CryptoNative_ErrPeekLastError(void)
{
return ERR_peek_last_error();
}
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp.c
index fcdd1aef74f..f4b6b3e0fc1 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_evp.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp.c
@@ -145,37 +145,37 @@ int32_t CryptoNative_EvpMdSize(const EVP_MD* md)
return EVP_MD_get_size(md);
}
-const EVP_MD* CryptoNative_EvpMd5()
+const EVP_MD* CryptoNative_EvpMd5(void)
{
// No error queue impact.
return EVP_md5();
}
-const EVP_MD* CryptoNative_EvpSha1()
+const EVP_MD* CryptoNative_EvpSha1(void)
{
// No error queue impact.
return EVP_sha1();
}
-const EVP_MD* CryptoNative_EvpSha256()
+const EVP_MD* CryptoNative_EvpSha256(void)
{
// No error queue impact.
return EVP_sha256();
}
-const EVP_MD* CryptoNative_EvpSha384()
+const EVP_MD* CryptoNative_EvpSha384(void)
{
// No error queue impact.
return EVP_sha384();
}
-const EVP_MD* CryptoNative_EvpSha512()
+const EVP_MD* CryptoNative_EvpSha512(void)
{
// No error queue impact.
return EVP_sha512();
}
-int32_t CryptoNative_GetMaxMdSize()
+int32_t CryptoNative_GetMaxMdSize(void)
{
// No error queue impact.
return EVP_MAX_MD_SIZE;
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c
index 672490c5ef4..82e5f8edc76 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp_cipher.c
@@ -233,169 +233,169 @@ int32_t CryptoNative_EvpCipherSetAeadTag(EVP_CIPHER_CTX* ctx, uint8_t* tag, int3
#endif
}
-const EVP_CIPHER* CryptoNative_EvpAes128Ecb()
+const EVP_CIPHER* CryptoNative_EvpAes128Ecb(void)
{
// No error queue impact.
return EVP_aes_128_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Cbc()
+const EVP_CIPHER* CryptoNative_EvpAes128Cbc(void)
{
// No error queue impact.
return EVP_aes_128_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Gcm()
+const EVP_CIPHER* CryptoNative_EvpAes128Gcm(void)
{
// No error queue impact.
return EVP_aes_128_gcm();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Cfb128()
+const EVP_CIPHER* CryptoNative_EvpAes128Cfb128(void)
{
// No error queue impact.
return EVP_aes_128_cfb128();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Cfb8()
+const EVP_CIPHER* CryptoNative_EvpAes128Cfb8(void)
{
// No error queue impact.
return EVP_aes_128_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpAes128Ccm()
+const EVP_CIPHER* CryptoNative_EvpAes128Ccm(void)
{
// No error queue impact.
return EVP_aes_128_ccm();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Ecb()
+const EVP_CIPHER* CryptoNative_EvpAes192Ecb(void)
{
// No error queue impact.
return EVP_aes_192_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Cfb128()
+const EVP_CIPHER* CryptoNative_EvpAes192Cfb128(void)
{
// No error queue impact.
return EVP_aes_192_cfb128();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Cfb8()
+const EVP_CIPHER* CryptoNative_EvpAes192Cfb8(void)
{
// No error queue impact.
return EVP_aes_192_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Cbc()
+const EVP_CIPHER* CryptoNative_EvpAes192Cbc(void)
{
// No error queue impact.
return EVP_aes_192_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Gcm()
+const EVP_CIPHER* CryptoNative_EvpAes192Gcm(void)
{
// No error queue impact.
return EVP_aes_192_gcm();
}
-const EVP_CIPHER* CryptoNative_EvpAes192Ccm()
+const EVP_CIPHER* CryptoNative_EvpAes192Ccm(void)
{
// No error queue impact.
return EVP_aes_192_ccm();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Ecb()
+const EVP_CIPHER* CryptoNative_EvpAes256Ecb(void)
{
// No error queue impact.
return EVP_aes_256_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Cfb128()
+const EVP_CIPHER* CryptoNative_EvpAes256Cfb128(void)
{
// No error queue impact.
return EVP_aes_256_cfb128();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Cfb8()
+const EVP_CIPHER* CryptoNative_EvpAes256Cfb8(void)
{
// No error queue impact.
return EVP_aes_256_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Cbc()
+const EVP_CIPHER* CryptoNative_EvpAes256Cbc(void)
{
// No error queue impact.
return EVP_aes_256_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Gcm()
+const EVP_CIPHER* CryptoNative_EvpAes256Gcm(void)
{
// No error queue impact.
return EVP_aes_256_gcm();
}
-const EVP_CIPHER* CryptoNative_EvpAes256Ccm()
+const EVP_CIPHER* CryptoNative_EvpAes256Ccm(void)
{
// No error queue impact.
return EVP_aes_256_ccm();
}
-const EVP_CIPHER* CryptoNative_EvpDesEcb()
+const EVP_CIPHER* CryptoNative_EvpDesEcb(void)
{
// No error queue impact.
return EVP_des_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpDesCfb8()
+const EVP_CIPHER* CryptoNative_EvpDesCfb8(void)
{
// No error queue impact.
return EVP_des_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpDesCbc()
+const EVP_CIPHER* CryptoNative_EvpDesCbc(void)
{
// No error queue impact.
return EVP_des_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Ecb()
+const EVP_CIPHER* CryptoNative_EvpDes3Ecb(void)
{
// No error queue impact.
return EVP_des_ede3();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Cfb8()
+const EVP_CIPHER* CryptoNative_EvpDes3Cfb8(void)
{
// No error queue impact.
return EVP_des_ede3_cfb8();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Cfb64()
+const EVP_CIPHER* CryptoNative_EvpDes3Cfb64(void)
{
// No error queue impact.
return EVP_des_ede3_cfb64();
}
-const EVP_CIPHER* CryptoNative_EvpDes3Cbc()
+const EVP_CIPHER* CryptoNative_EvpDes3Cbc(void)
{
// No error queue impact.
return EVP_des_ede3_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpRC2Ecb()
+const EVP_CIPHER* CryptoNative_EvpRC2Ecb(void)
{
// No error queue impact.
return EVP_rc2_ecb();
}
-const EVP_CIPHER* CryptoNative_EvpRC2Cbc()
+const EVP_CIPHER* CryptoNative_EvpRC2Cbc(void)
{
// No error queue impact.
return EVP_rc2_cbc();
}
-const EVP_CIPHER* CryptoNative_EvpChaCha20Poly1305()
+const EVP_CIPHER* CryptoNative_EvpChaCha20Poly1305(void)
{
// No error queue impact.
#if HAVE_OPENSSL_CHACHA20POLY1305
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
index 1d60be1c8e8..402903b8781 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c
@@ -4,7 +4,7 @@
#include <assert.h>
#include "pal_evp_pkey.h"
-EVP_PKEY* CryptoNative_EvpPkeyCreate()
+EVP_PKEY* CryptoNative_EvpPkeyCreate(void)
{
ERR_clear_error();
return EVP_PKEY_new();
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c b/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c
index 431c2b8ec06..e21acffd3b2 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_ssl.c
@@ -34,7 +34,7 @@ c_static_assert(TLSEXT_STATUSTYPE_ocsp == 1);
int32_t CryptoNative_EnsureOpenSslInitialized(void);
#ifdef NEED_OPENSSL_1_0
-static void EnsureLibSsl10Initialized()
+static void EnsureLibSsl10Initialized(void)
{
SSL_library_init();
SSL_load_error_strings();
@@ -91,7 +91,7 @@ static uint64_t SSL_set_options_dynamic(SSL* s, uint64_t options)
static int32_t g_config_specified_ciphersuites = 0;
static char* g_emptyAlpn = "";
-static void DetectCiphersuiteConfiguration()
+static void DetectCiphersuiteConfiguration(void)
{
#ifdef FEATURE_DISTRO_AGNOSTIC_SSL
@@ -173,7 +173,7 @@ static void DetectCiphersuiteConfiguration()
#endif
}
-void CryptoNative_EnsureLibSslInitialized()
+void CryptoNative_EnsureLibSslInitialized(void)
{
CryptoNative_EnsureOpenSslInitialized();
@@ -192,7 +192,7 @@ void CryptoNative_EnsureLibSslInitialized()
DetectCiphersuiteConfiguration();
}
-const SSL_METHOD* CryptoNative_SslV2_3Method()
+const SSL_METHOD* CryptoNative_SslV2_3Method(void)
{
// No error queue impact.
const SSL_METHOD* method = TLS_method();
@@ -909,7 +909,7 @@ const char* CryptoNative_GetOpenSslCipherSuiteName(SSL* ssl, int32_t cipherSuite
#endif
}
-int32_t CryptoNative_Tls13Supported()
+int32_t CryptoNative_Tls13Supported(void)
{
// No error queue impact.
diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_x509.c b/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
index f04bc45be7b..5dbd1bdc2e3 100644
--- a/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
+++ b/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
@@ -252,7 +252,7 @@ int32_t CryptoNative_X509StoreSetRevocationFlag(X509_STORE* ctx, X509RevocationF
return X509_STORE_set_flags(ctx, verifyFlags);
}
-X509_STORE_CTX* CryptoNative_X509StoreCtxCreate()
+X509_STORE_CTX* CryptoNative_X509StoreCtxCreate(void)
{
ERR_clear_error();
return X509_STORE_CTX_new();
@@ -889,7 +889,7 @@ static OCSP_CERTID* MakeCertId(X509* subject, X509* issuer)
return OCSP_cert_to_id(EVP_sha1(), subject, issuer);
}
-static time_t GetIssuanceWindowStart()
+static time_t GetIssuanceWindowStart(void)
{
// time_t granularity is seconds, so subtract 4 days worth of seconds.
// The 4 day policy is based on the CA/Browser Forum Baseline Requirements