mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-11 17:10:06 +00:00
Add explicit void parameter in libspirv.h again (#2032)
When building C code with gcc and the -Wstrict-prototypes option, function declarations and definitions that don't specify their argument types generate warnings. Functions that don't take parameters need to specify (void) as their parameter list, rather than leaving it empty. Note this only applies to C, so only the functions exported in C-compatible headers need fixing. In C++ functions can't be declared/defined without a parameter list, so C++ can safely allow an empty parameter list to imply (void).
This commit is contained in:
parent
60fac96c6b
commit
398f37a2e0
@ -498,7 +498,7 @@ SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetSkipBlockLayout(
|
||||
// Creates an optimizer options object with default options. Returns a valid
|
||||
// options object. The object remains valid until it is passed into
|
||||
// |spvOptimizerOptionsDestroy|.
|
||||
SPIRV_TOOLS_EXPORT spv_optimizer_options spvOptimizerOptionsCreate();
|
||||
SPIRV_TOOLS_EXPORT spv_optimizer_options spvOptimizerOptionsCreate(void);
|
||||
|
||||
// Destroys the given optimizer options object.
|
||||
SPIRV_TOOLS_EXPORT void spvOptimizerOptionsDestroy(
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "source/spirv_optimizer_options.h"
|
||||
|
||||
SPIRV_TOOLS_EXPORT spv_optimizer_options spvOptimizerOptionsCreate() {
|
||||
SPIRV_TOOLS_EXPORT spv_optimizer_options spvOptimizerOptionsCreate(void) {
|
||||
return new spv_optimizer_options_t();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user