diff --git a/src/OSspecific/POSIX/printStack.C b/src/OSspecific/POSIX/printStack.C index d94451e5aa..6a30b7a321 100644 --- a/src/OSspecific/POSIX/printStack.C +++ b/src/OSspecific/POSIX/printStack.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,17 +91,17 @@ void printSourceFileAndLine // Convert offset into .so into offset into executable. void *addr; - sscanf(myAddress.c_str(), "%p",&addr); + sscanf(myAddress.c_str(), "%p", &addr); Dl_info info; dladdr(addr, &info); - unsigned long offset = ulong(info.dli_fbase); + uintptr_t offset = uintptr_t(info.dli_fbase); IStringStream addressStr(address.substr(2)); - long addressValue = ReadHex(addressStr); - long relativeAddress = addressValue-offset; + uintptr_t addressValue = ReadHex(addressStr); + intptr_t relativeAddress = addressValue - offset; // Reconstruct hex word from address OStringStream nStream; diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 58536fd928..31cef4111d 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -566,10 +566,10 @@ Foam::label Foam::ptscotchDecomp::decompose { Pout<< "SCOTCH_dgraphBuild with:" << nl << "xadjSize-1 : " << xadjSize-1 << nl - << "xadj : " << long(xadj) << nl - << "velotab : " << long(velotab.begin()) << nl + << "xadj : " << uintptr_t(xadj) << nl + << "velotab : " << uintptr_t(velotab.begin()) << nl << "adjncySize : " << adjncySize << nl - << "adjncy : " << long(adjncy) << nl + << "adjncy : " << uintptr_t(adjncy) << nl << endl; }