Skip to content

Commit

Permalink
Merge pull request #970 from waywardmonkeys/fix-strict-prototype-warn…
Browse files Browse the repository at this point in the history
…ings

Fix strict-prototype warnings.
  • Loading branch information
floooh authored Jan 20, 2024
2 parents 5cd323a + 397948a commit b98f8ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
Like clipboard support, drag'n'drop support must be explicitly enabled
at startup in the sapp_desc struct.
sapp_desc sokol_main() {
sapp_desc sokol_main(void) {
return (sapp_desc) {
.enable_dragndrop = true, // default is false
...
Expand All @@ -547,7 +547,7 @@
You can also adjust the maximum number of files that are accepted
in a drop operation, and the maximum path length in bytes if needed:
sapp_desc sokol_main() {
sapp_desc sokol_main(void) {
return (sapp_desc) {
.enable_dragndrop = true, // default is false
.max_dropped_files = 8, // default is 1
Expand Down Expand Up @@ -687,7 +687,7 @@
For instance on a Retina Mac, returning the following sapp_desc
struct from sokol_main():
sapp_desc sokol_main() {
sapp_desc sokol_main(void) {
return (sapp_desc) {
.width = 640,
.height = 480,
Expand Down Expand Up @@ -4046,7 +4046,7 @@ _SOKOL_PRIVATE void _sapp_macos_frame(void) {
}
#endif

_SOKOL_PRIVATE void _sapp_macos_poll_input_events() {
_SOKOL_PRIVATE void _sapp_macos_poll_input_events(void) {
/*
NOTE: late event polling temporarily out-commented to check if this
Expand Down Expand Up @@ -5782,7 +5782,7 @@ _SOKOL_PRIVATE void _sapp_emsc_register_eventhandlers(void) {
#endif
}

_SOKOL_PRIVATE void _sapp_emsc_unregister_eventhandlers() {
_SOKOL_PRIVATE void _sapp_emsc_unregister_eventhandlers(void) {
emscripten_set_mousedown_callback(_sapp.html5_canvas_selector, 0, true, 0);
emscripten_set_mouseup_callback(_sapp.html5_canvas_selector, 0, true, 0);
emscripten_set_mousemove_callback(_sapp.html5_canvas_selector, 0, true, 0);
Expand Down Expand Up @@ -9640,7 +9640,7 @@ _SOKOL_PRIVATE void* _sapp_glx_getprocaddr(const char* procname)
}
}

_SOKOL_PRIVATE void _sapp_glx_init() {
_SOKOL_PRIVATE void _sapp_glx_init(void) {
const char* sonames[] = { "libGL.so.1", "libGL.so", 0 };
for (int i = 0; sonames[i]; i++) {
_sapp.glx.libgl = dlopen(sonames[i], RTLD_LAZY|RTLD_GLOBAL);
Expand Down Expand Up @@ -9715,7 +9715,7 @@ _SOKOL_PRIVATE int _sapp_glx_attrib(GLXFBConfig fbconfig, int attrib) {
return value;
}

_SOKOL_PRIVATE GLXFBConfig _sapp_glx_choosefbconfig() {
_SOKOL_PRIVATE GLXFBConfig _sapp_glx_choosefbconfig(void) {
GLXFBConfig* native_configs;
_sapp_gl_fbconfig* usable_configs;
const _sapp_gl_fbconfig* closest;
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/sokol_spine_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static void log_func(const char* tag, uint32_t log_level, uint32_t log_item, con
last_logitem = log_item;
}

static void init() {
static void init(void) {
last_logitem = SSPINE_LOGITEM_OK;
sg_setup(&(sg_desc){0});
sspine_setup(&(sspine_desc){ .logger = { .func = log_func } });
Expand All @@ -29,7 +29,7 @@ static void init_with_desc(const sspine_desc* desc) {
sspine_setup(&desc1);
}

static void shutdown() {
static void shutdown(void) {
sspine_shutdown();
sg_shutdown();
}
Expand Down
2 changes: 1 addition & 1 deletion util/sokol_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ SOKOL_GL_API_DECL sgl_context sgl_get_context(void);
SOKOL_GL_API_DECL sgl_context sgl_default_context(void);

/* draw recorded commands (call inside a sokol-gfx render pass) */
SOKOL_GL_API_DECL void sgl_draw();
SOKOL_GL_API_DECL void sgl_draw(void);
SOKOL_GL_API_DECL void sgl_context_draw(sgl_context ctx);
SOKOL_GL_API_DECL void sgl_draw_layer(int layer_id);
SOKOL_GL_API_DECL void sgl_context_draw_layer(sgl_context ctx, int layer_id);
Expand Down

0 comments on commit b98f8ee

Please sign in to comment.