[Paraview] ParaView and Visual Studio 2003 - fix for pow(). Also __FUNCTION__ warning.
Andrew J. P. Maclean
a . maclean at cas . edu . au
Wed, 23 Jul 2003 09:29:16 +1000
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C350FC.E5F427F0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
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."
Thanks
Andrew
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www . cas . edu . au/
___________________________________________
------=_NextPart_000_0006_01C350FC.E5F427F0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-AU link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I am using the latest CVS for ParaView =
Complete.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>In vtkPVData.cxx function: =
UpdataActorControlResolutions</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>change lines 2820/2821:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> half =3D 0.5 * pow(10, =
ceil(oneh));</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> res =3D (oneh > =
log10(half) ? half : pow(10, floor(oneh)));</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>to:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> half =3D 0.5 * =
pow((float)10, ceil(oneh));</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> res =3D (oneh > =
log10(half) ? half : pow((float)10,
floor(oneh)));</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The following code in H5private.h line =
212:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>#ifndef H5_HAVE_FUNCTION</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'># define __FUNCTION__ =
"NoFunctionName"</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>#endif</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>generates the following warning:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>C:\vtk\ParaView\Utilities\hdf5\H5private.h(212) : =
warning
C4117:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> macro name '__FUNCTION__' is reserved, =
'#define' ignored</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Apparently __FUNCTION__ is reserved in =
MSVC7.1</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>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!</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>__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."</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> Andrew</span></font></p>
<p class=3DMsoNormal><b><font size=3D2 color=3D"#330099" =
face=3DVerdana><span
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Verdana;color:#330099;
font-weight:bold'>___________________________________________</span></fon=
t></b></p>
<table class=3DMsoNormalTable border=3D0 cellspacing=3D0 cellpadding=3D0 =
width=3D479
style=3D'width:287.6pt'>
<tr height=3D33 style=3D'height:19.8pt'>
<td width=3D30 height=3D33 valign=3Dtop =
style=3D'width:18.0pt;padding:0cm 0cm 0cm 0cm;
height:19.8pt'>
<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'> </span></font></p>
</td>
<td width=3D449 colspan=3D2 height=3D33 valign=3Dtop =
style=3D'width:269.6pt;padding:
0cm 0cm 0cm 0cm;height:19.8pt'>
<p class=3DMsoNormal style=3D'text-autospace:none'><b><font size=3D3 =
color=3D"#330099"
face=3DVerdana><span lang=3DEN-US =
style=3D'font-size:12.0pt;font-family:Verdana;
color:#330099;font-weight:bold'>Andrew J. P. =
Maclean</span></font></b></p>
</td>
</tr>
<tr height=3D94 style=3D'height:56.25pt'>
<td width=3D30 height=3D94 valign=3Dtop =
style=3D'width:18.0pt;padding:0cm 0cm 0cm 0cm;
height:56.25pt'>
<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'> </span></font></p>
</td>
<td width=3D449 colspan=3D2 height=3D94 valign=3Dtop =
style=3D'width:269.6pt;padding:
0cm 0cm 0cm 0cm;height:56.25pt'>
<p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D2 =
face=3DVerdana><span
lang=3DEN-US style=3D'font-size:10.0pt;font-family:Verdana'>Centre for =
Autonomous
Systems</span></font><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'><br>
The Rose Street Building J04<br>
The </span></font><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'>University</span></font><font size=3D2 =
face=3DVerdana><span
style=3D'font-size:10.0pt;font-family:Verdana'> of =
</span></font><font size=3D2
face=3DVerdana><span =
style=3D'font-size:10.0pt;font-family:Verdana'>Sydney</span></font><font
size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;font-family:Verdana'>
2006 NSW<br>
</span></font><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'>AUSTRALIA</span></font></p>
</td>
</tr>
<tr>
<td width=3D30 style=3D'width:18.0pt;padding:0cm 0cm 0cm 0cm'>
<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'> </span></font></p>
</td>
<td width=3D234 style=3D'width:140.55pt;padding:0cm 0cm 0cm 0cm'>
<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'>Ph: +61 2 9351 3283</span></font></p>
</td>
<td width=3D215 style=3D'width:129.05pt;padding:0cm 0cm 0cm 0cm'>
<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'>Fax: +61 2 9351 7474</span></font></p>
</td>
</tr>
<tr>
<td width=3D30 style=3D'width:18.0pt;padding:0cm 0cm 0cm 0cm'>
<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'> </span></font></p>
</td>
<td width=3D449 colspan=3D2 style=3D'width:269.6pt;padding:0cm 0cm 0cm =
0cm'>
<p class=3DMsoNormal><font size=3D2 face=3DVerdana><span =
style=3D'font-size:10.0pt;
font-family:Verdana'>URL: </span></font><font size=3D2 =
face=3DVerdana><span
lang=3DEN-US style=3D'font-size:10.0pt;font-family:Verdana'><a
=
href=3D"http://www . cas . edu . au/">http://www . cas . edu . au/</a></span></font><=
/p>
</td>
</tr>
</table>
<p class=3DMsoAutoSig><b><font size=3D2 color=3D"#330099" =
face=3DVerdana><span
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Verdana;color:#330099;
font-weight:bold'>___________________________________________</span></fon=
t></b></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>
------=_NextPart_000_0006_01C350FC.E5F427F0--