clang: Resolve compilation warnings concerning function declaration without a prototype

This commit is contained in:
Nigel Stewart 2025-06-19 19:30:20 +10:00
parent 68710dd920
commit aa8d664143
9 changed files with 14 additions and 14 deletions

View File

@ -51,7 +51,7 @@ if (@ARGV)
if (keys %$functions or keys @$reuse)
{
print "#ifdef $extname\n\n";
print "static GLboolean _glewInit_$extname ()\n{\n GLboolean r = GL_FALSE;\n";
print "static GLboolean _glewInit_$extname (void)\n{\n GLboolean r = GL_FALSE;\n";
output_reuse($reuse, \&make_reuse_call);
output_decls($functions, \&make_pfn_def_init);
print "\n return r;\n}\n\n";

View File

@ -38,7 +38,7 @@ if (@ARGV)
#print "#ifdef $extname\n\n";
if (keys %$functions)
{
print "static GLboolean _glewInit_$extname ();\n";
print "static GLboolean _glewInit_$extname (void);\n";
}
#print "#endif /* $extname */\n\n";
}

View File

@ -12,7 +12,7 @@ GLboolean glxewGetExtension (const char* name)
return _glewSearchExtension(name, start, end);
}
GLenum glxewInit ()
GLenum glxewInit (void)
{
Display* display;
int major, minor;

View File

@ -20,7 +20,7 @@ GLboolean GLEWAPIENTRY wglewGetExtension (const char* name)
return _glewSearchExtension(name, start, end);
}
GLenum GLEWAPIENTRY wglewInit ()
GLenum GLEWAPIENTRY wglewInit (void)
{
GLboolean crippled;
const GLubyte* extStart;

View File

@ -2,5 +2,5 @@
#elif !defined(GLEW_EGL) && !defined(GLEW_OSMESA) /* _UNIX */
static void glxewInfo ()
static void glxewInfo (void)
{

View File

@ -49,7 +49,7 @@ GLboolean glewCreateContext (struct createParams *params);
GLboolean glewParseArgs (int argc, char** argv, struct createParams *);
void glewDestroyContext ();
void glewDestroyContext (void);
/* ------------------------------------------------------------------------- */

View File

@ -300,7 +300,7 @@ GLboolean glewCreateContext (struct createParams *params)
return GL_FALSE;
}
void glewDestroyContext ()
void glewDestroyContext (void)
{
if (NULL != ctx) eglDestroyContext(display, ctx);
}
@ -328,7 +328,7 @@ GLboolean glewCreateContext (struct createParams *params)
return GL_FALSE;
}
void glewDestroyContext ()
void glewDestroyContext (void)
{
if (NULL != ctx) OSMesaDestroyContext(ctx);
}
@ -413,7 +413,7 @@ GLboolean glewCreateContext (struct createParams* params)
return GL_FALSE;
}
void glewDestroyContext ()
void glewDestroyContext (void)
{
if (NULL != rc) wglMakeCurrent(NULL, NULL);
if (NULL != rc) wglDeleteContext(rc);
@ -471,7 +471,7 @@ GLboolean glewCreateContext (struct createParams *params)
return GL_FALSE;
}
void glewDestroyContext ()
void glewDestroyContext (void)
{
CGLSetCurrentContext(octx);
CGLReleaseContext(ctx);
@ -488,7 +488,7 @@ GLboolean glewCreateContext (struct createParams *params)
return GL_FALSE;
}
void glewDestroyContext ()
void glewDestroyContext (void)
{
/* TODO: Haiku: We need to call C++ code here */
}
@ -596,7 +596,7 @@ GLboolean glewCreateContext (struct createParams *params)
return GL_FALSE;
}
void glewDestroyContext ()
void glewDestroyContext (void)
{
if (NULL != dpy && NULL != ctx) glXDestroyContext(dpy, ctx);
if (NULL != dpy && 0 != wnd) XDestroyWindow(dpy, wnd);

View File

@ -1,6 +1,6 @@
/* ------------------------------------------------------------------------ */
GLEWAPI GLenum GLEWAPIENTRY glxewInit ();
GLEWAPI GLenum GLEWAPIENTRY glxewInit (void);
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#ifndef GLXEW_GET_VAR

View File

@ -1,6 +1,6 @@
/* ------------------------------------------------------------------------- */
GLEWAPI GLenum GLEWAPIENTRY wglewInit ();
GLEWAPI GLenum GLEWAPIENTRY wglewInit (void);
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#ifndef WGLEW_GET_VAR