aboutsummaryrefslogtreecommitdiff
path: root/src/sst.c
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-03-10 20:37:28 +0000
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-04-06 16:41:13 +0100
commitdaa55cade14146f04814cf8a7ad2028becf4db66 (patch)
tree62933a231e8068f4498596a9064f59e1a4842723 /src/sst.c
parent244fea664121acf12871ab5858a5fe95a2606b52 (diff)
downloadsst-daa55cade14146f04814cf8a7ad2028becf4db66.tar.gz
sst-daa55cade14146f04814cf8a7ad2028becf4db66.zip
Use C23 void-argument-free prototypes
In the future we can also consider moving to {} instead of {0} for initialisers, but my old Clang (16) doesn't support this, so it might be wise to wait longer on that one so people don't need too bleeding-edge of a compiler just to build this thing.
Diffstat (limited to 'src/sst.c')
-rw-r--r--src/sst.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sst.c b/src/sst.c
index 726fe2d..d8a9b09 100644
--- a/src/sst.c
+++ b/src/sst.c
@@ -61,7 +61,7 @@ bool sst_userunloaded = false; // see hook_plugin_unload_cb() below
#ifdef _WIN32
extern long __ImageBase; // this is actually the PE header struct but don't care
-static inline void *ownhandle(void) { return &__ImageBase; }
+static inline void *ownhandle() { return &__ImageBase; }
#else
// sigh, _GNU_SOURCE crap. define here instead >:(
typedef struct {
@@ -71,7 +71,7 @@ typedef struct {
void *dli_saddr;
} Dl_info;
int dladdr1(const void *addr, Dl_info *info, void **extra_info, int flags);
-static void *ownhandle(void) {
+static void *ownhandle() {
static void *cached = 0;
Dl_info dontcare;
if_cold (!cached) {
@@ -287,7 +287,7 @@ static const char *const featmsgs[] = { // "
" [ FAILED! ] %s (failed to access engine)\n"
};
-static inline void successbanner(void) { // called by generated code
+static inline void successbanner() { // called by generated code
con_colourmsg(&(struct rgba){64, 255, 64, 255},
LONGNAME " v" VERSION " successfully loaded");
con_colourmsg(&(struct rgba){255, 255, 255, 255}, " for game ");
@@ -296,7 +296,7 @@ static inline void successbanner(void) { // called by generated code
#include <glue.gen.h> // generated by build/gluegen.c
-static void do_featureinit(void) {
+static void do_featureinit() {
engineapi_lateinit();
// load libs that might not be there early (...at least on Linux???)
clientlib = os_dlhandle(OS_LIT("client") OS_LIT(OS_DLSUFFIX));
@@ -361,7 +361,7 @@ DECL_VFUNC_DYN(bool, VGuiIsInitialized)
// startup, in order to init the features properly.
//
// Route credit to bill for helping figure a lot of this out - mike
-static bool deferinit(void) {
+static bool deferinit() {
if_cold (!vgui) {
errmsg_warnx("can't use VEngineVGui for deferred feature setup");
goto e;
@@ -388,8 +388,8 @@ e: con_warn("!!! SOME FEATURES MAY BE BROKEN !!!\n");
}
DEF_PREDICATE(AllowPluginLoading, bool)
-DEF_EVENT(PluginLoaded, void)
-DEF_EVENT(PluginUnloaded, void)
+DEF_EVENT(PluginLoaded)
+DEF_EVENT(PluginUnloaded)
static struct con_cmd *cmd_plugin_load, *cmd_plugin_unload;
static con_cmdcb orig_plugin_load_cb, orig_plugin_unload_cb;
@@ -473,7 +473,7 @@ static bool do_load(ifacefactory enginef, ifacefactory serverf) {
return true;
}
-static void do_unload(void) {
+static void do_unload() {
// slow path: reloading shouldn't happen all the time, prioritise fast exit
if_cold (sst_userunloaded) { // note: if we're here, pluginhandler is set
cmd_plugin_load->cb = orig_plugin_load_cb;