Skip to content

Commit

Permalink
Silence windows warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Oct 16, 2024
1 parent 328545f commit 260c33c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions c-example/runtime_loading.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <libloaderapi.h>
#include <errhandlingapi.h>
#define dlopen(lib, flags) LoadLibraryA(lib)
#define dlsym(handle, sym) GetProcAddress(handle, sym)
#define dlsym(handle, sym) (void*)GetProcAddress(handle, sym)

char* dlerror() {
DWORD err = GetLastError();
Expand Down Expand Up @@ -63,8 +63,8 @@ int main(int argc, char** argv) {
typeof(&bs_name) bs_name = dlsym(handle, "bs_name");
typeof(&bs_param_num) bs_param_num = dlsym(handle, "bs_param_num");

if (!bs_model_construct || !bs_free_error_msg || !bs_model_destruct ||
!bs_name || !bs_param_num) {
if (!bs_model_construct || !bs_free_error_msg || !bs_model_destruct
|| !bs_name || !bs_param_num) {
fprintf(stderr, "Error: %s\n", dlerror());
return 1;
}
Expand Down

0 comments on commit 260c33c

Please sign in to comment.