Skip to content

Commit 56e406e

Browse files
committed
c: silence VS 'function call missing argument list' warnings
closes: #508
1 parent 7acc116 commit 56e406e

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

glad/generator/c/templates/egl.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static int glad_egl_find_extensions_{{ api|lower }}(EGLDisplay display) {
3939
{% for extension in feature_set.extensions %}
4040
GLAD_{{ extension.name }} = glad_egl_has_extension(extensions, "{{ extension.name }}");
4141
{% else %}
42-
GLAD_UNUSED(glad_egl_has_extension);
42+
GLAD_UNUSED(&glad_egl_has_extension);
4343
{% endfor %}
4444

4545
return 1;
@@ -114,4 +114,4 @@ int gladLoad{{ api|api }}(EGLDisplay display, GLADloadfunc load) {
114114
}
115115
{% endfor %}
116116

117-
{% endblock %}
117+
{% endblock %}

glad/generator/c/templates/gl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int glad_gl_find_extensions_{{ api|lower }}({{ template_utils.context_arg
132132
{% for extension in feature_set.extensions|select('supports', api) %}
133133
{{ ('GLAD_' + extension.name)|ctx(name_only=True) }} = glad_gl_has_extension(exts, exts_i, "{{ extension.name }}");
134134
{% else %}
135-
GLAD_UNUSED(glad_gl_has_extension);
135+
GLAD_UNUSED(&glad_gl_has_extension);
136136
{% endfor %}
137137

138138
glad_gl_free_extensions(exts_i);

glad/generator/c/templates/glx.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static int glad_glx_find_extensions(Display *display, int screen) {
4747
{% for extension in feature_set.extensions %}
4848
GLAD_{{ extension.name }} = glad_glx_has_extension(display, screen, "{{ extension.name }}");
4949
{% else %}
50-
GLAD_UNUSED(glad_glx_has_extension);
50+
GLAD_UNUSED(&glad_glx_has_extension);
5151
{% endfor %}
5252
return 1;
5353
}
@@ -100,4 +100,4 @@ int gladLoad{{ api|api }}(Display *display, int screen, GLADloadfunc load) {
100100
}
101101
{% endfor %}
102102

103-
{% endblock %}
103+
{% endblock %}

glad/generator/c/templates/loader/gles2.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static GLADapiproc glad_gles2_get_proc(void *vuserptr, const char* name) {
2929
GLADapiproc result = NULL;
3030

3131
#if GLAD_PLATFORM_EMSCRIPTEN
32-
GLAD_UNUSED(glad_dlsym_handle);
32+
GLAD_UNUSED(&glad_dlsym_handle);
3333
#else
3434
{# /* dlsym first, since some implementations don't return function pointers for core functions */ #}
3535
result = glad_dlsym_handle(userptr.handle, name);
@@ -56,7 +56,7 @@ static void* glad_gles2_dlopen_handle({{ template_utils.context_arg(def='void')
5656
#endif
5757

5858
#if GLAD_PLATFORM_EMSCRIPTEN
59-
GLAD_UNUSED(glad_get_dlopen_handle);
59+
GLAD_UNUSED(&glad_get_dlopen_handle);
6060
return NULL;
6161
#else
6262
if ({{ loader_handle }} == NULL) {
@@ -89,8 +89,8 @@ int gladLoaderLoadGLES2{{ 'Context' if options.mx }}({{ template_utils.context_a
8989
#if GLAD_PLATFORM_EMSCRIPTEN
9090
GLAD_UNUSED(handle);
9191
GLAD_UNUSED(did_load);
92-
GLAD_UNUSED(glad_gles2_dlopen_handle);
93-
GLAD_UNUSED(glad_gles2_build_userptr);
92+
GLAD_UNUSED(&glad_gles2_dlopen_handle);
93+
GLAD_UNUSED(&glad_gles2_build_userptr);
9494
userptr.get_proc_address_ptr = emscripten_GetProcAddress;
9595
version = gladLoadGLES2{{ 'Context' if options.mx }}UserPtr({{ 'context, ' if options.mx }}glad_gles2_get_proc, &userptr);
9696
#else

glad/generator/c/templates/vk.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static int glad_vk_find_extensions_{{ api|lower }}({{ template_utils.context_arg
137137
{% endfor %}
138138

139139
{# Special case: only one extension which is protected -> unused at compile time only on some platforms #}
140-
GLAD_UNUSED(glad_vk_has_extension);
140+
GLAD_UNUSED(&glad_vk_has_extension);
141141

142142
glad_vk_free_extensions(extension_count, extensions);
143143

glad/generator/c/templates/wgl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static int glad_wgl_find_extensions_{{ api|lower }}(HDC hdc) {
5454
{% for extension in feature_set.extensions %}
5555
GLAD_{{ extension.name }} = glad_wgl_has_extension(hdc, "{{ extension.name }}");
5656
{% else %}
57-
GLAD_UNUSED(glad_wgl_has_extension);
57+
GLAD_UNUSED(&glad_wgl_has_extension);
5858
{% endfor %}
5959
return 1;
6060
}

0 commit comments

Comments
 (0)