Commit 1405baf1 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

Rename variable for warning supression

parent 18cded8a
......@@ -335,11 +335,11 @@ int TestBinaryWriting()
// kulu.crd IRIX64-6.5-CC-o32
// a62.iue.tuwien.ac.at OSF1-V5.1-cxx
#if defined(VTK_CXX_SGI) || defined( __DECCXX_VER)
ofstream fout("TestCxxFeatures_TestBinaryWriting", ios::out );
ofstream fout_with_warning_C4701("TestCxxFeatures_TestBinaryWriting", ios::out );
#else
ofstream fout("TestCxxFeatures_TestBinaryWriting", ios::out | ios::binary);
ofstream fout_with_warning_C4701("TestCxxFeatures_TestBinaryWriting", ios::out | ios::binary);
#endif
if(!fout)
if(!fout_with_warning_C4701)
{
cerr << "Error opening TestCxxFeatures_TestBinaryWriting for binary writing.\n";
result = 0;
......
......@@ -752,7 +752,7 @@ int otherArrays(int, char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return otherArraysTest(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return otherArraysTest(vtkmsg_with_warning_C4701);
}
......@@ -159,6 +159,6 @@ int otherByteSwap(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestByteSwap(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestByteSwap(vtkmsg_with_warning_C4701);
}
......@@ -86,6 +86,6 @@ int otherCellArray(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestCellArray(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestCellArray(vtkmsg_with_warning_C4701);
}
......@@ -368,6 +368,6 @@ int otherCellBoundaries(int, char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestOCB(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestOCB(vtkmsg_with_warning_C4701);
}
......@@ -367,6 +367,6 @@ int otherCellDerivatives(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestOCD(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestOCD(vtkmsg_with_warning_C4701);
}
......@@ -433,6 +433,6 @@ int otherCellPosition(int, char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestOCP(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestOCP(vtkmsg_with_warning_C4701);
}
......@@ -98,8 +98,8 @@ int otherEmptyCell(int , char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
TestOEC(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
TestOEC(vtkmsg_with_warning_C4701);
return 0;
}
......@@ -602,6 +602,6 @@ int otherRectilinearGrid(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestORG(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestORG(vtkmsg_with_warning_C4701);
}
......@@ -634,6 +634,6 @@ int otherStructuredGrid(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestOSG(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestOSG(vtkmsg_with_warning_C4701);
}
......@@ -70,8 +70,8 @@ int otherTimerLog(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
otherTimerLogTest(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
otherTimerLogTest(vtkmsg_with_warning_C4701);
return 0;
}
......@@ -297,6 +297,6 @@ int quadraticEvaluation(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return TestQE(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return TestQE(vtkmsg_with_warning_C4701);
}
......@@ -99,11 +99,11 @@ static PyObject *PyVTKObject_PyString(PyVTKObject *self)
}
PyErr_Clear();
ostrstream buf;
self->vtk_ptr->Print(buf);
buf.put('\0');
PyObject *res = PyString_FromString(buf.str());
buf.rdbuf()->freeze(0);
ostrstream vtkmsg_with_warning_C4701;
self->vtk_ptr->Print(vtkmsg_with_warning_C4701);
vtkmsg_with_warning_C4701.put('\0');
PyObject *res = PyString_FromString(vtkmsg_with_warning_C4701.str());
vtkmsg_with_warning_C4701.rdbuf()->freeze(0);
return res;
}
......
......@@ -41,7 +41,7 @@
#endif
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkTimerLog, "1.33");
vtkCxxRevisionMacro(vtkTimerLog, "1.34");
vtkStandardNewMacro(vtkTimerLog);
// initialze the class variables
......@@ -394,25 +394,24 @@ void vtkTimerLog::DumpLogWithIndents(ostream *os, float threshold)
#endif
}
//----------------------------------------------------------------------------
// Write the timing table out to a file. Calculate some helpful
// statistics (deltas and percentages) in the process.
void vtkTimerLog::DumpLog(const char *filename)
{
#ifndef _WIN32_WCE
ofstream os(filename);
ofstream os_with_warning_C4701(filename);
int i;
if ( vtkTimerLog::WrapFlag )
{
vtkTimerLog::DumpEntry(os, 0,
vtkTimerLog::DumpEntry(os_with_warning_C4701, 0,
vtkTimerLog::TimerLog[vtkTimerLog::NextEntry].WallTime, 0,
vtkTimerLog::TimerLog[vtkTimerLog::NextEntry].CpuTicks, 0,
vtkTimerLog::TimerLog[vtkTimerLog::NextEntry].Event);
for (i=vtkTimerLog::NextEntry+1; i<vtkTimerLog::MaxEntries; i++)
{
vtkTimerLog::DumpEntry(os,
vtkTimerLog::DumpEntry(os_with_warning_C4701,
i-vtkTimerLog::NextEntry, vtkTimerLog::TimerLog[i].WallTime,
vtkTimerLog::TimerLog[i].WallTime
- vtkTimerLog::TimerLog[i-1].WallTime,
......@@ -421,7 +420,7 @@ void vtkTimerLog::DumpLog(const char *filename)
- vtkTimerLog::TimerLog[i-1].CpuTicks,
vtkTimerLog::TimerLog[i].Event);
}
vtkTimerLog::DumpEntry(os, vtkTimerLog::MaxEntries-vtkTimerLog::NextEntry,
vtkTimerLog::DumpEntry(os_with_warning_C4701, vtkTimerLog::MaxEntries-vtkTimerLog::NextEntry,
vtkTimerLog::TimerLog[0].WallTime,
vtkTimerLog::TimerLog[0].WallTime
-vtkTimerLog::TimerLog[vtkTimerLog::MaxEntries-1].WallTime,
......@@ -431,7 +430,7 @@ void vtkTimerLog::DumpLog(const char *filename)
vtkTimerLog::TimerLog[0].Event);
for (i=1; i<vtkTimerLog::NextEntry; i++)
{
vtkTimerLog::DumpEntry(os, vtkTimerLog::MaxEntries-vtkTimerLog::NextEntry+i,
vtkTimerLog::DumpEntry(os_with_warning_C4701, vtkTimerLog::MaxEntries-vtkTimerLog::NextEntry+i,
vtkTimerLog::TimerLog[i].WallTime,
vtkTimerLog::TimerLog[i].WallTime
- vtkTimerLog::TimerLog[i-1].WallTime,
......@@ -443,12 +442,12 @@ void vtkTimerLog::DumpLog(const char *filename)
}
else
{
vtkTimerLog::DumpEntry(os, 0, vtkTimerLog::TimerLog[0].WallTime, 0,
vtkTimerLog::DumpEntry(os_with_warning_C4701, 0, vtkTimerLog::TimerLog[0].WallTime, 0,
vtkTimerLog::TimerLog[0].CpuTicks, 0,
vtkTimerLog::TimerLog[0].Event);
for (i=1; i<vtkTimerLog::NextEntry; i++)
{
vtkTimerLog::DumpEntry(os, i, vtkTimerLog::TimerLog[i].WallTime,
vtkTimerLog::DumpEntry(os_with_warning_C4701, i, vtkTimerLog::TimerLog[i].WallTime,
vtkTimerLog::TimerLog[i].WallTime
- vtkTimerLog::TimerLog[i-1].WallTime,
vtkTimerLog::TimerLog[i].CpuTicks,
......@@ -458,7 +457,7 @@ void vtkTimerLog::DumpLog(const char *filename)
}
}
os.close();
os_with_warning_C4701.close();
#endif
}
......
......@@ -152,6 +152,6 @@ int otherColorTransferFunction(int, char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return Test(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return Test(vtkmsg_with_warning_C4701);
}
......@@ -42,7 +42,7 @@
#include "vtkTIFFWriter.h"
#include "vtkTexture.h"
vtkCxxRevisionMacro(vtkRIBExporter, "1.52");
vtkCxxRevisionMacro(vtkRIBExporter, "1.53");
vtkStandardNewMacro(vtkRIBExporter);
typedef float RtColor[3];
......@@ -834,76 +834,78 @@ void vtkRIBExporter::WritePolygons (vtkPolyData *polyData,
{
if ( pointData )
{
int cc, aa; ostrstream str;
int cc, aa;
ostrstream str_with_warning_C4701;
for ( cc = 0; cc < pointData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = pointData->GetArray(cc);
char buffer[1024];
this->ModifyArrayName(buffer, array->GetName());
str << "\"" << buffer << "\" [";
str_with_warning_C4701 << "\"" << buffer << "\" [";
for (kk = 0; kk < npts; kk++)
{
float* tuple = array->GetTuple(pts[kk]);
for ( aa = 0; aa < array->GetNumberOfComponents(); aa++ )
{
str << ((!kk &&!aa) ? "" : " ") << tuple[aa];
str_with_warning_C4701 << ((!kk &&!aa) ? "" : " ") << tuple[aa];
}
}
str << "] ";
str_with_warning_C4701 << "] ";
}
str << ends;
fprintf ( this->FilePtr, "%s", str.str() );
str.rdbuf()->freeze(0);
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
}
if ( cellData )
{
int cc, aa;
ostrstream str;
ostrstream str_with_warning_C4701;
for ( cc = 0; cc < cellData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = cellData->GetArray(cc);
char buffer[1024];
this->ModifyArrayName(buffer, array->GetName());
str << "\"" << buffer << "\" [";
str_with_warning_C4701 << "\"" << buffer << "\" [";
for (kk = 0; kk < npts; kk++)
{
float* tuple = array->GetTuple(pts[kk]);
for ( aa = 0; aa < array->GetNumberOfComponents(); aa++ )
{
str << ((!kk &&!aa) ? "" : " ") << tuple[aa];
str_with_warning_C4701 << ((!kk &&!aa) ? "" : " ") << tuple[aa];
}
}
str << "] ";
str_with_warning_C4701 << "] ";
}
str << ends;
fprintf ( this->FilePtr, "%s", str.str() );
str.rdbuf()->freeze(0);
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
}
if ( fieldData )
{
int cc, aa;
ostrstream str;
ostrstream str_with_warning_C4701;
for ( cc = 0; cc < fieldData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = fieldData->GetArray(cc);
char buffer[1024];
this->ModifyArrayName(buffer, array->GetName());
str << "\"" << buffer << "\" [";
str_with_warning_C4701 << "\"" << buffer << "\" [";
for (kk = 0; kk < npts; kk++)
{
float* tuple = array->GetTuple(pts[kk]);
for ( aa = 0; aa < array->GetNumberOfComponents(); aa++ )
{
str << ((!kk &&!aa) ? "" : " ") << tuple[aa];
str_with_warning_C4701 << ((!kk &&!aa) ? "" : " ") << tuple[aa];
}
}
str << "] ";
str_with_warning_C4701 << "] ";
}
str << ends;
fprintf ( this->FilePtr, "%s", str.str() );
str.rdbuf()->freeze(0);
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
}
}
......@@ -1086,76 +1088,76 @@ void vtkRIBExporter::WriteStrips (vtkPolyData *polyData,
if ( pointData )
{
int cc, aa;
ostrstream str;
ostrstream str_with_warning_C4701;
for ( cc = 0; cc < pointData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = pointData->GetArray(cc);
char buffer[1024];
this->ModifyArrayName(buffer, array->GetName());
str << "\"" << buffer << "\" [";
str_with_warning_C4701 << "\"" << buffer << "\" [";
for (kk = 0; kk < npts; kk++)
{
float* tuple = array->GetTuple(pts[kk]);
for ( aa = 0; aa < array->GetNumberOfComponents(); aa++ )
{
str << ((!kk &&!aa) ? "" : " ") << tuple[aa];
str_with_warning_C4701 << ((!kk &&!aa) ? "" : " ") << tuple[aa];
}
}
str << "] ";
str_with_warning_C4701 << "] ";
}
str << ends;
fprintf ( this->FilePtr, "%s", str.str() );
str.rdbuf()->freeze(0);
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
}
if ( cellData )
{
int cc, aa;
ostrstream str;
ostrstream str_with_warning_C4701;
for ( cc = 0; cc < cellData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = cellData->GetArray(cc);
char buffer[1024];
this->ModifyArrayName(buffer, array->GetName());
str << "\"" << buffer << "\" [";
str_with_warning_C4701 << "\"" << buffer << "\" [";
for (kk = 0; kk < npts; kk++)
{
float* tuple = array->GetTuple(pts[kk]);
for ( aa = 0; aa < array->GetNumberOfComponents(); aa++ )
{
str << ((!kk &&!aa) ? "" : " ") << tuple[aa];
str_with_warning_C4701 << ((!kk &&!aa) ? "" : " ") << tuple[aa];
}
}
str << "] ";
str_with_warning_C4701 << "] ";
}
str << ends;
fprintf ( this->FilePtr, "%s", str.str() );
str.rdbuf()->freeze(0);
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
}
if ( fieldData )
{
int cc, aa;
ostrstream str;
ostrstream str_with_warning_C4701;
for ( cc = 0; cc < fieldData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = fieldData->GetArray(cc);
char buffer[1024];
this->ModifyArrayName(buffer, array->GetName());
str << "\"" << buffer << "\" [";
str_with_warning_C4701 << "\"" << buffer << "\" [";
for (kk = 0; kk < npts; kk++)
{
float* tuple = array->GetTuple(pts[kk]);
for ( aa = 0; aa < array->GetNumberOfComponents(); aa++ )
{
str << ((!kk &&!aa) ? "" : " ") << tuple[aa];
str_with_warning_C4701 << ((!kk &&!aa) ? "" : " ") << tuple[aa];
}
}
str << "] ";
str_with_warning_C4701 << "] ";
}
str << ends;
fprintf ( this->FilePtr, "%s", str.str() );
str.rdbuf()->freeze(0);
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
}
}
fprintf (this->FilePtr, "\n");
......
......@@ -25,7 +25,7 @@
#include "vtkXMLDataElement.h"
#include "vtkXMLDataReader.h"
vtkCxxRevisionMacro(vtkXMLPDataReader, "1.4");
vtkCxxRevisionMacro(vtkXMLPDataReader, "1.5");
//----------------------------------------------------------------------------
vtkXMLPDataReader::vtkXMLPDataReader()
......@@ -361,10 +361,10 @@ int vtkXMLPDataReader::CanReadPiece(int index)
//----------------------------------------------------------------------------
char* vtkXMLPDataReader::CreatePieceFileName(const char* fileName)
{
ostrstream fn;
if(this->PathName) { fn << this->PathName; }
fn << fileName << ends;
return fn.str();
ostrstream fn_with_warning_C4701;
if(this->PathName) { fn_with_warning_C4701 << this->PathName; }
fn_with_warning_C4701 << fileName << ends;
return fn_with_warning_C4701.str();
}
//----------------------------------------------------------------------------
......
......@@ -18,7 +18,7 @@
#include "vtkXMLPDataWriter.h"
#include "vtkDataSet.h"
vtkCxxRevisionMacro(vtkXMLPDataWriter, "1.3");
vtkCxxRevisionMacro(vtkXMLPDataWriter, "1.4");
//----------------------------------------------------------------------------
vtkXMLPDataWriter::vtkXMLPDataWriter()
......@@ -223,13 +223,15 @@ void vtkXMLPDataWriter::SplitFileName()
//----------------------------------------------------------------------------
char* vtkXMLPDataWriter::CreatePieceFileName(int index, const char* path)
{
ostrstream fn;
if(path) { fn << path; }
fn << this->FileNameBase << index;
if(this->PieceFileNameExtension) { fn << this->PieceFileNameExtension; }
//if(this->FileNameExtension) { fn << this->FileNameExtension; }
fn << ends;
return fn.str();
ostrstream fn_with_warning_C4701;
if(path) { fn_with_warning_C4701 << path; }
fn_with_warning_C4701 << this->FileNameBase << index;
if(this->PieceFileNameExtension)
{ fn_with_warning_C4701 << this->PieceFileNameExtension; }
//if(this->FileNameExtension)
//{ fn_with_warning_C4701 << this->FileNameExtension; }
fn_with_warning_C4701 << ends;
return fn_with_warning_C4701.str();
}
//----------------------------------------------------------------------------
......
......@@ -173,7 +173,7 @@ int otherCoordinate(int,char *[])
{
vtkDebugLeaks::PromptUserOff();
ostrstream vtkmsg;
return Test(vtkmsg);
ostrstream vtkmsg_with_warning_C4701;
return Test(vtkmsg_with_warning_C4701);
}
......@@ -747,11 +747,11 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
fprintf(fp," jstring tmp;\n\n");
fprintf(fp," op = (vtkObject *)vtkJavaGetPointerFromObject(env,obj,(char *) \"vtkObject\");\n");
fprintf(fp," ostrstream buf;\n");
fprintf(fp," op->Print(buf);\n");
fprintf(fp," buf.put('\\0');\n");
fprintf(fp," tmp = vtkJavaMakeJavaString(env,buf.str());\n");
fprintf(fp," delete buf.str();\n");
fprintf(fp," ostrstream vtkmsg_with_warning_C4701;\n");
fprintf(fp," op->Print(vtkmsg_with_warning_C4701);\n");
fprintf(fp," vtkmsg_with_warning_C4701.put('\\0');\n");
fprintf(fp," tmp = vtkJavaMakeJavaString(env,vtkmsg_with_warning_C4701.str());\n");
fprintf(fp," delete vtkmsg_with_warning_C4701.str();\n");
fprintf(fp," return tmp;\n");
fprintf(fp,"}\n");
......@@ -761,11 +761,11 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
fprintf(fp," jstring tmp;\n\n");
fprintf(fp," op = (vtkObject *)vtkJavaGetPointerFromObject(env,obj,(char *) \"vtkObject\");\n");
fprintf(fp," ostrstream buf;\n");
fprintf(fp," op->PrintRevisions(buf);\n");
fprintf(fp," buf.put('\\0');\n");
fprintf(fp," tmp = vtkJavaMakeJavaString(env,buf.str());\n");
fprintf(fp," delete buf.str();\n");
fprintf(fp," ostrstream vtkmsg_with_warning_C4701;\n");
fprintf(fp," op->PrintRevisions(vtkmsg_with_warning_C4701);\n");
fprintf(fp," vtkmsg_with_warning_C4701.put('\\0');\n");
fprintf(fp," tmp = vtkJavaMakeJavaString(env,vtkmsg_with_warning_C4701.str());\n");
fprintf(fp," delete vtkmsg_with_warning_C4701.str();\n");
fprintf(fp," return tmp;\n");
fprintf(fp,"}\n");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment