Skip to content

Commit

Permalink
Fix warning about void function call prototype (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitboy16 authored Mar 16, 2024
1 parent 99a0ea1 commit 613b3f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libwhich.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int putchar(WCHAR c)
{
return putc(c, stdout);
}
void abort() {
void abort(void) {
ExitProcess(128 + 6);
}
LPWSTR *CommandLineToArgv(LPWSTR lpCmdLine, int *pNumArgs)
Expand Down Expand Up @@ -182,7 +182,7 @@ struct vector_t {
#if defined(__APPLE__)
#include <mach-o/dyld.h>

struct vector_t dllist()
struct vector_t dllist(void)
{
struct vector_t dynamic_libraries;
dynamic_libraries.length = _dyld_image_count();
Expand Down Expand Up @@ -217,7 +217,7 @@ int get_names(struct dl_phdr_info *info, size_t size, void *data)
dynamic_libraries->data[i] = info->dlpi_name;
return 0;
}
struct vector_t dllist()
struct vector_t dllist(void)
{
struct vector_t dynamic_libraries = {NULL, 0};
dl_iterate_phdr(get_names, (void*)&dynamic_libraries);
Expand Down Expand Up @@ -250,7 +250,7 @@ const char *dlpath(void *handle, struct vector_t name)

#elif defined(_WIN32)

const STR dlerror() {
const STR dlerror(void) {
STR errmsg;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
Expand Down Expand Up @@ -280,7 +280,7 @@ const STR dlpath(HMODULE handle, struct vector_t name)
}
}

struct vector_t dllist()
struct vector_t dllist(void)
{
struct vector_t dynamic_libraries = {NULL, 0};
HMODULE _hModules[32];
Expand Down

0 comments on commit 613b3f0

Please sign in to comment.