aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJames Jones <jajones@nvidia.com>2018-03-23 13:17:52 -0700
committerDavid Neto <dneto@google.com>2018-04-03 10:10:43 -0400
commit6dd5e955f503e2ece39a6738e8f14fb16cb398ba (patch)
tree78461500e220fc6c8e5bba962afc7d2aecba2d44 /include
parentfc9f621e8bb2c1fe18d3c3d18e0fb4e0e69fecb1 (diff)
downloadspirv-tools-6dd5e955f503e2ece39a6738e8f14fb16cb398ba.tar.gz
Add missing function parameters in libspirv.h
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).
Diffstat (limited to 'include')
-rw-r--r--include/spirv-tools/libspirv.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/spirv-tools/libspirv.h b/include/spirv-tools/libspirv.h
index a1c8f7d2..de5f16ca 100644
--- a/include/spirv-tools/libspirv.h
+++ b/include/spirv-tools/libspirv.h
@@ -377,12 +377,12 @@ typedef const spv_validator_options_t* spv_const_validator_options;
// Returns the SPIRV-Tools software version as a null-terminated string.
// The contents of the underlying storage is valid for the remainder of
// the process.
-SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionString();
+SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionString(void);
// Returns a null-terminated string containing the name of the project,
// the software version string, and commit details.
// The contents of the underlying storage is valid for the remainder of
// the process.
-SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionDetailsString();
+SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionDetailsString(void);
// Certain target environments impose additional restrictions on SPIR-V, so it's
// often necessary to specify which one applies. SPV_ENV_UNIVERSAL means
@@ -438,7 +438,7 @@ SPIRV_TOOLS_EXPORT void spvContextDestroy(spv_context context);
// Creates a Validator options object with default options. Returns a valid
// options object. The object remains valid until it is passed into
// spvValidatorOptionsDestroy.
-SPIRV_TOOLS_EXPORT spv_validator_options spvValidatorOptionsCreate();
+SPIRV_TOOLS_EXPORT spv_validator_options spvValidatorOptionsCreate(void);
// Destroys the given Validator options object.
SPIRV_TOOLS_EXPORT void spvValidatorOptionsDestroy(