Skip to content

Commit 59e156b

Browse files
gnoliyilcharles-lunarg
authored andcommitted
loader: Explicitly specify argument types
Function definitions / declarations without specifying the argument types are deprecated in all C versions and may trigger compiler warnings (-Wstrict-prototypes). This change replaces all `function()` definitions and declarations with `function(void)`. Test: Vulkan-Loader builds on Fuchsia with Wstrict-prototypes enabled. Bug: https://fxbug.dev/378964821 Change-Id: I0b43f3d78baa70637b001e8ddbb7ebeedd7d5513
1 parent 7552270 commit 59e156b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

loader/loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ void loader_initialize(void) {
20032003
#endif
20042004
}
20052005

2006-
void loader_release() {
2006+
void loader_release(void) {
20072007
// Guarantee release of the preloaded ICD libraries. This may have already been called in vkDestroyInstance.
20082008
loader_unload_preloaded_icds();
20092009

loader/loader_environment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
// Environment variables
3939
#if COMMON_UNIX_PLATFORMS
4040

41-
bool is_high_integrity() { return geteuid() != getuid() || getegid() != getgid(); }
41+
bool is_high_integrity(void) { return geteuid() != getuid() || getegid() != getgid(); }
4242

4343
char *loader_getenv(const char *name, const struct loader_instance *inst) {
4444
if (NULL == name) return NULL;

loader/loader_environment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void loader_free_getenv(char *val, const struct loader_instance *inst);
3737

3838
#if defined(WIN32) || COMMON_UNIX_PLATFORMS
3939

40-
bool is_high_integrity();
40+
bool is_high_integrity(void);
4141

4242
char *loader_secure_getenv(const char *name, const struct loader_instance *inst);
4343

0 commit comments

Comments
 (0)