[Paraview] ParaView and Visual Studio 2003 - fix for pow().
Also __FUNCTION__ warning.
Andy Cedilnik
andy . cedilnik at kitware . com
23 Jul 2003 08:44:59 -0400
Hi Andrew,
I did not spend a lot of time cmakifying hdf5, so there are some
problems. It does however seem to work on all platforms we do testing.
I will look at the pow stuff.
Andy
On Tue, 2003-07-22 at 19:29, Andrew J. P. Maclean wrote:
> I am using the latest CVS for ParaView Complete.
>
>
>
> In vtkPVData.cxx function: UpdataActorControlResolutions
>
> change lines 2820/2821:
>
> half = 0.5 * pow(10, ceil(oneh));
>
> res = (oneh > log10(half) ? half : pow(10, floor(oneh)));
>
>
>
> to:
>
> half = 0.5 * pow((float)10, ceil(oneh));
>
> res = (oneh > log10(half) ? half : pow((float)10, floor(oneh)));
>
>
>
> The following code in H5private.h line 212:
>
>
>
> #ifndef H5_HAVE_FUNCTION
>
> # define __FUNCTION__ "NoFunctionName"
>
> #endif
>
>
>
> generates the following warning:
>
>
>
> C:\vtk\ParaView\Utilities\hdf5\H5private.h(212) : warning C4117:
>
> macro name '__FUNCTION__' is reserved, '#define' ignored
>
>
>
> Apparently __FUNCTION__ is reserved in MSVC7.1
>
>
>
> It is probably better not to use double or single underscores at the
> start of names. Compilers seem to reserve these. I have been caught by
> this before!
>
> __FUNCTION__ is definitely a Microsoft-Specific predefined macro and,
> from the documentation, it is "Valid only within a function and
> returns the undecorated name of the enclosing function (as a string).
> __FUNCTION__ is not expanded if you use the /EP or /P compiler
> option."