work around warnings when compiling with C++ and gcc -pedantic

This commit is contained in:
Axel Kohlmeyer
2022-10-31 16:12:02 -04:00
parent 5ed7df248c
commit 3ae2f9966b

View File

@ -60,9 +60,9 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
lmp->handle = handle;
#ifdef _WIN32
#define ADDSYM(symbol) lmp->symbol = (void *) GetProcAddress((HINSTANCE) handle, "lammps_" #symbol)
#define ADDSYM(symbol) *(void **) (&lmp->symbol) = (void *) GetProcAddress((HINSTANCE) handle, "lammps_" #symbol)
#else
#define ADDSYM(symbol) lmp->symbol = dlsym(handle,"lammps_" #symbol)
#define ADDSYM(symbol) *(void **) (&lmp->symbol) = dlsym(handle,"lammps_" #symbol)
#endif
#if defined(LAMMPS_LIB_MPI)