From 7542b9b53b91e449ed61d450a67be72d1c742643 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Mon, 21 Feb 2011 11:56:51 +0000 Subject: [PATCH] COMP: codeStream.C: added cast --- .../db/dictionary/functionEntries/codeStream/codeStream.C | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C index e52297e2c4d..08f61902b83 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C @@ -217,8 +217,11 @@ bool Foam::functionEntries::codeStream::execute // Find the library handle. - void (*function)(const dictionary&, Ostream& os); - *(void **) (&function) = dlSym(lib, name); + void (*function)(const dictionary&, Ostream&); + function = reinterpret_cast<void(*)(const dictionary&, Ostream&)> + ( + dlSym(lib, name) + ); if (!function) { -- GitLab