Commit c450ff06 authored by Dave Demarle's avatar Dave Demarle
Browse files

COMP: fix more unused var and parameter warnings

parent 49010082
......@@ -169,11 +169,11 @@ return( XDMF_SUCCESS );
}
XdmfInt32
XdmfAttribute::SetValues(XdmfArray *Values){
if(Values == this->Values) return(XDMF_SUCCESS);
XdmfAttribute::SetValues(XdmfArray *someValues){
if(someValues == this->Values) return(XDMF_SUCCESS);
if(this->ValuesAreMine && this->Values) delete this->Values;
this->ValuesAreMine = 0;
this->Values = Values;
this->Values = someValues;
return(XDMF_SUCCESS);
}
......
......@@ -577,10 +577,10 @@ XdmfInt32 XdmfDataItem::Build(){
}
XdmfInt32
XdmfDataItem::CheckValues(XdmfInt32 Format){
XdmfDataItem::CheckValues(XdmfInt32 aFormat){
if(this->Values){
// Exists
if(this->Values->Format != Format){
if(this->Values->Format != aFormat){
// Wrong Format
XdmfDebug("CheckValues Changing Format");
delete this->Values;
......
......@@ -77,17 +77,17 @@ XdmfElement::~XdmfElement() {
if(this->ElementName) delete [] this->ElementName;
}
void XdmfElement::SetReferenceObject(XdmfXmlNode Element, void *p){
void XdmfElement::SetReferenceObject(XdmfXmlNode anElement, void *p){
XdmfElementData *PrivateData;
if(!Element){
if(!anElement){
XdmfErrorMessage("Element is NULL");
return;
}
if(XDMF_XML_PRIVATE_DATA(Element)){
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(Element);
if(XDMF_XML_PRIVATE_DATA(anElement)){
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(anElement);
}else{
PrivateData = new XdmfElementData;
XDMF_XML_PRIVATE_DATA(Element) = (void *)PrivateData;
XDMF_XML_PRIVATE_DATA(anElement) = (void *)PrivateData;
}
// XdmfDebug("Old Ref = " << PrivateData->GetReferenceElement());
// XdmfDebug("New Ref = " << p);
......@@ -95,17 +95,17 @@ void XdmfElement::SetReferenceObject(XdmfXmlNode Element, void *p){
}
void *
XdmfElement::GetReferenceObject(XdmfXmlNode Element){
XdmfElement::GetReferenceObject(XdmfXmlNode anElement){
XdmfElementData *PrivateData;
if(!Element){
if(!anElement){
XdmfErrorMessage("NULL Reference Element");
return(NULL);
}
if(XDMF_XML_PRIVATE_DATA(Element) == XDMF_EMPTY_REFERENCE){
if(XDMF_XML_PRIVATE_DATA(anElement) == XDMF_EMPTY_REFERENCE){
XdmfDebug("XML Node contains no initialized object");
return(NULL);
}
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(Element);
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(anElement);
if(PrivateData->GetReferenceElement() == XDMF_EMPTY_REFERENCE){
XdmfDebug("XML Node contains no initialized object");
return(NULL);
......@@ -113,29 +113,29 @@ XdmfElement::GetReferenceObject(XdmfXmlNode Element){
return(PrivateData->GetReferenceElement());
}
void XdmfElement::SetCurrentXdmfElement(XdmfXmlNode Element, void *p){
void XdmfElement::SetCurrentXdmfElement(XdmfXmlNode anElement, void *p){
XdmfElementData *PrivateData;
if(!Element){
if(!anElement){
XdmfErrorMessage("Element is NULL");
return;
}
if(XDMF_XML_PRIVATE_DATA(Element)){
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(Element);
if(XDMF_XML_PRIVATE_DATA(anElement)){
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(anElement);
}else{
PrivateData = new XdmfElementData;
XDMF_XML_PRIVATE_DATA(Element) = (void *)PrivateData;
XDMF_XML_PRIVATE_DATA(anElement) = (void *)PrivateData;
}
PrivateData->SetCurrentXdmfElement((XdmfElement *)p);
}
void *
XdmfElement::GetCurrentXdmfElement(XdmfXmlNode Element){
XdmfElement::GetCurrentXdmfElement(XdmfXmlNode anElement){
XdmfElementData *PrivateData;
if(!Element){
if(!anElement){
XdmfErrorMessage("NULL Reference Element");
return(NULL);
}
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(Element);
PrivateData = (XdmfElementData *)XDMF_XML_PRIVATE_DATA(anElement);
if(!PrivateData){
return(NULL);
}
......@@ -146,16 +146,16 @@ XdmfElement::GetCurrentXdmfElement(XdmfXmlNode Element){
return(PrivateData->GetCurrentXdmfElement());
}
XdmfInt32 XdmfElement::SetElement(XdmfXmlNode Element){
if(!Element) {
XdmfInt32 XdmfElement::SetElement(XdmfXmlNode anElement){
if(!anElement) {
XdmfErrorMessage("Element is NULL");
return(XDMF_FAIL);
}
// Clear the ReferenceObject underlying node. This will also create PrivateData if necessary
XdmfDebug("Clearing ReferenceObject of XML node");
this->SetReferenceObject(Element, XDMF_EMPTY_REFERENCE);
this->SetCurrentXdmfElement(Element, this);
this->Element = Element;
this->SetReferenceObject(anElement, XDMF_EMPTY_REFERENCE);
this->SetCurrentXdmfElement(anElement, this);
this->Element = anElement;
return(XDMF_SUCCESS);
}
......@@ -209,7 +209,7 @@ XdmfElement::Insert(XdmfElement *Child){
}
XdmfInt32
XdmfElement::Copy(XdmfElement *Source){
XdmfElement::Copy(XdmfElement *){
return(XDMF_SUCCESS);
}
......@@ -327,18 +327,18 @@ XdmfInt32 XdmfElement::Update(){
}
XdmfXmlNode
XdmfElement::FollowReference(XdmfXmlNode Element){
XdmfElement::FollowReference(XdmfXmlNode anElement){
XdmfConstString Value;
XdmfXmlNode ref = NULL;
if(!Element){
if(!anElement){
XdmfErrorMessage("Element is NULL");
return((XdmfXmlNode)XDMF_ERROR_REFERENCE);
}
Value = this->DOM->Get(Element, "Reference");
Value = this->DOM->Get(anElement, "Reference");
if(Value){
if(STRCASECMP(Value, "XML") == 0){
Value = this->DOM->GetCData(Element);
Value = this->DOM->GetCData(anElement);
if(!Value){
XdmfErrorMessage("Reference to CDATA is NULL");
return((XdmfXmlNode)XDMF_ERROR_REFERENCE);
......@@ -355,14 +355,14 @@ XdmfElement::FollowReference(XdmfXmlNode Element){
}
XdmfXmlNode
XdmfElement::CheckForReference(XdmfXmlNode Element){
XdmfElement::CheckForReference(XdmfXmlNode anElement){
XdmfXmlNode node;
XdmfDebug("XdmfElement::CheckForReference(XdmfXmlNode Element)");
if(!Element) return((XdmfXmlNode)XDMF_ERROR_REFERENCE);
if(!anElement) return((XdmfXmlNode)XDMF_ERROR_REFERENCE);
// Does the Referenced Node Exist and is it of the Same Type
node = this->FollowReference(Element);
node = this->FollowReference(anElement);
if(node == (XdmfXmlNode)XDMF_ERROR_REFERENCE){
XdmfErrorMessage("Error Following Reference");
return((XdmfXmlNode)XDMF_ERROR_REFERENCE);
......@@ -370,8 +370,8 @@ XdmfElement::CheckForReference(XdmfXmlNode Element){
if(node){
XdmfDebug("Element is a Reference");
// Check Type (low level XML "name") against this->Element
if(STRCMP((const char *)node->name, (const char *)Element->name) != 0){
XdmfErrorMessage("Reference node is a " << node->name << " not " << Element->name);
if(STRCMP((const char *)node->name, (const char *)anElement->name) != 0){
XdmfErrorMessage("Reference node is a " << node->name << " not " << anElement->name);
return((XdmfXmlNode)XDMF_ERROR_REFERENCE);
}
}else{
......@@ -379,7 +379,7 @@ XdmfElement::CheckForReference(XdmfXmlNode Element){
return((XdmfXmlNode)XDMF_EMPTY_REFERENCE);
}
XdmfDebug("Setting ReferenceElement");
this->ReferenceElement = Element;
this->ReferenceElement = anElement;
this->SetIsReference(1);
return(node);
}
......@@ -436,7 +436,7 @@ XdmfInt32 XdmfElement::Build(){
return(XDMF_SUCCESS);
}
XdmfInt32 XdmfElement::Set(XdmfConstString Name, XdmfConstString Value){
XdmfInt32 XdmfElement::Set(XdmfConstString aName, XdmfConstString Value){
if(!this->DOM) {
XdmfErrorMessage("No DOM has been set");
return(XDMF_FAIL);
......@@ -445,12 +445,12 @@ XdmfInt32 XdmfElement::Set(XdmfConstString Name, XdmfConstString Value){
XdmfErrorMessage("No XML Node has been set");
return(XDMF_FAIL);
}
this->DOM->Set(this->Element, Name, Value);
this->DOM->Set(this->Element, aName, Value);
return(XDMF_SUCCESS);
}
XdmfConstString XdmfElement::Get(XdmfConstString Name){
XdmfConstString XdmfElement::Get(XdmfConstString aName){
if(!this->DOM) {
XdmfErrorMessage("No DOM has been set");
return(NULL);
......@@ -459,5 +459,5 @@ XdmfConstString XdmfElement::Get(XdmfConstString Name){
XdmfErrorMessage("No XML Node has been set");
return(NULL);
}
return(this->DOM->Get(this->Element, Name));
return(this->DOM->Get(this->Element, aName));
}
......@@ -137,17 +137,17 @@ XdmfGrid::Build(){
}
XdmfInt32
XdmfGrid::SetGridTypeFromString(XdmfConstString GridType){
if(XDMF_WORD_CMP(GridType, "Uniform")){
XdmfGrid::SetGridTypeFromString(XdmfConstString aGridType){
if(XDMF_WORD_CMP(aGridType, "Uniform")){
this->SetGridType(XDMF_GRID_UNIFORM);
}else if(XDMF_WORD_CMP(GridType, "Tree")){
}else if(XDMF_WORD_CMP(aGridType, "Tree")){
this->SetGridType(XDMF_GRID_TREE);
}else if(XDMF_WORD_CMP(GridType, "Collection")){
}else if(XDMF_WORD_CMP(aGridType, "Collection")){
this->SetGridType(XDMF_GRID_COLLECTION);
}else if(XDMF_WORD_CMP(GridType, "Subset")){
}else if(XDMF_WORD_CMP(aGridType, "Subset")){
this->SetGridType(XDMF_GRID_SUBSET);
}else{
XdmfErrorMessage("Unknown Grid Type : " << GridType);
XdmfErrorMessage("Unknown Grid Type : " << aGridType);
return(XDMF_FAIL);
}
return(XDMF_SUCCESS);
......@@ -250,7 +250,7 @@ return(0);
XdmfInt32
XdmfGrid::UpdateInformation() {
XdmfXmlNode Element;
XdmfXmlNode anElement;
XdmfInt32 Status = XDMF_FAIL;
XdmfConstString attribute;
......@@ -369,20 +369,20 @@ if( this->GridType & XDMF_GRID_MASK){
// return(XDMF_SUCCESS);
}else{
// Handle Uniform Grid
Element = this->DOM->FindElement("Topology", 0, this->Element);
if(Element){
anElement = this->DOM->FindElement("Topology", 0, this->Element);
if(anElement){
if(this->Topology->SetDOM( this->DOM ) == XDMF_FAIL) return(XDMF_FAIL);
if(this->Topology->SetElement(Element) == XDMF_FAIL) return(XDMF_FAIL);
if(this->Topology->SetElement(anElement) == XDMF_FAIL) return(XDMF_FAIL);
Status = this->Topology->UpdateInformation();
if( Status == XDMF_FAIL ){
XdmfErrorMessage("Error Reading Topology");
return( XDMF_FAIL );
}
}
Element = this->DOM->FindElement("Geometry", 0, this->Element);
if(Element){
anElement = this->DOM->FindElement("Geometry", 0, this->Element);
if(anElement){
if(this->Geometry->SetDOM( this->DOM ) == XDMF_FAIL) return(XDMF_FAIL);
if(this->Geometry->SetElement(Element) == XDMF_FAIL) return(XDMF_FAIL);
if(this->Geometry->SetElement(anElement) == XDMF_FAIL) return(XDMF_FAIL);
Status = this->Geometry->UpdateInformation();
if( Status == XDMF_FAIL ){
XdmfErrorMessage("Error Reading Geometry");
......@@ -420,7 +420,7 @@ return( XDMF_SUCCESS );
XdmfInt32
XdmfGrid::Update() {
XdmfInt32 Status = XDMF_FAIL;
//cout << " In Update" << endl;
......@@ -464,7 +464,7 @@ if((this->GridType & XDMF_GRID_MASK) != XDMF_GRID_UNIFORM){
if(select){
XdmfDataItem *di = new XdmfDataItem;
XdmfArray *celloff, *newconn;
XdmfInt64 i, o, o1, len, total;
XdmfInt64 i1, o, o1, len, total;
XdmfInt64 *cell, cellsize = 100;
cell = new XdmfInt64[ cellsize ];
......@@ -477,9 +477,9 @@ if((this->GridType & XDMF_GRID_MASK) != XDMF_GRID_UNIFORM){
newconn = new XdmfArray;
newconn->SetNumberOfElements(target->GetTopology()->GetConnectivity()->GetNumberOfElements());
total = 0;
for(i=0; i< di->GetArray()->GetNumberOfElements() ; i++){
o = celloff->GetValueAsInt64(di->GetArray()->GetValueAsInt64(i));
o1 = celloff->GetValueAsInt64(di->GetArray()->GetValueAsInt64(i) + 1);
for(i1=0; i1< di->GetArray()->GetNumberOfElements() ; i1++){
o = celloff->GetValueAsInt64(di->GetArray()->GetValueAsInt64(i1));
o1 = celloff->GetValueAsInt64(di->GetArray()->GetValueAsInt64(i1) + 1);
// cout << " Getting " << o << " thru " << o1 << endl;
len = o1 - o;
if(len > cellsize){
......@@ -493,7 +493,7 @@ if((this->GridType & XDMF_GRID_MASK) != XDMF_GRID_UNIFORM){
return(XDMF_FAIL);
}
newconn->SetValues(total, cell, len);
// cout << " Offset " << i << " = " << o << " len = " << len << " total " << total << endl;
// cout << " Offset " << i1 << " = " << o << " len = " << len << " total " << total << endl;
total += len;
}
......
......@@ -61,7 +61,7 @@ XdmfRoot::Insert( XdmfElement *Child){
XdmfInt32 XdmfRoot::Build(){
static char VersionBuf[80];
ostrstream Version(VersionBuf,80);
ostrstream aVersion(VersionBuf,80);
if(!this->GetElement()){
if(this->GetDOM()){
......@@ -73,7 +73,7 @@ XdmfInt32 XdmfRoot::Build(){
}
if(XdmfElement::Build() != XDMF_SUCCESS) return(XDMF_FAIL);
// Version and XInclude
Version << this->Version << ends;
this->Set("Version", (XdmfConstString)Version.str());
aVersion << this->Version << ends;
this->Set("Version", (XdmfConstString)aVersion.str());
return(XDMF_SUCCESS);
}
......@@ -86,7 +86,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define USE_IMAGE_DATA // otherwise uniformgrid
vtkStandardNewMacro(vtkXdmfReader);
vtkCxxRevisionMacro(vtkXdmfReader, "1.16");
vtkCxxRevisionMacro(vtkXdmfReader, "1.17");
vtkCxxSetObjectMacro(vtkXdmfReader,Controller,vtkMultiProcessController);
......@@ -649,7 +649,7 @@ int vtkXdmfReader::RequestDataObject(vtkInformationVector *outputVector)
// for each output
vtkXdmfReaderInternal::MapOfActualGrids::iterator currentGridIterator;
currentGridIterator = this->Internals->ActualGrids.begin();
int i=0;
int someOutputChanged=0;
vtkInformation *jinfo=newOutputVector->GetInformationObject(0);
......@@ -752,10 +752,10 @@ int vtkXdmfReader::RequestData(
//----------------------------------------------------------------------------
int vtkXdmfReaderInternal::RequestActualGridData(
const char* currentGridName,
const char* vtkNotUsed(currentGridName),
vtkXdmfReaderActualGrid* currentActualGrid,
int outputGrid,
int numberOfGrids,
int vtkNotUsed(numberOfGrids),
vtkInformationVector *outputVector)
{
......@@ -1861,8 +1861,8 @@ int vtkXdmfReader::RequestInformation(
//-----------------------------------------------------------------------------
int vtkXdmfReaderInternal::RequestActualGridInformation(
vtkXdmfReaderActualGrid* currentActualGrid,
int outputGrid,
int numberOfGrids,
int vtkNotUsed(outputGrid),
int vtkNotUsed(numberOfGrids),
vtkInformationVector* outputVector)
{
// Handle single grid
......@@ -2408,7 +2408,7 @@ int vtkXdmfReader::GetNumberOfParameters()
}
//----------------------------------------------------------------------------
const char *vtkXdmfReader::GetParameterName(int index)
const char *vtkXdmfReader::GetParameterName(int vtkNotUsed(index))
{
/*
XdmfParameter *Param;
......@@ -2431,7 +2431,7 @@ const char *vtkXdmfReader::GetParameterName(int index)
return(0);
}
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterType(const char *parameterName)
int vtkXdmfReader::GetParameterType(const char *vtkNotUsed(parameterName))
{
/*
XdmfParameter *Param;
......@@ -2454,7 +2454,7 @@ int vtkXdmfReader::GetParameterType(const char *parameterName)
return(0);
}
//----------------------------------------------------------------------------
const char *vtkXdmfReader::GetParameterTypeAsString(const char *parameterName)
const char *vtkXdmfReader::GetParameterTypeAsString(const char *vtkNotUsed(parameterName))
{
/*
if (this->GetParameterType(parameterName) == XDMF_PARAMETER_RANGE_TYPE)
......@@ -2465,7 +2465,7 @@ const char *vtkXdmfReader::GetParameterTypeAsString(const char *parameterName)
return("LIST");
}
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterType(int index)
int vtkXdmfReader::GetParameterType(int vtkNotUsed(index))
{
/*
XdmfParameter *Param;
......@@ -2489,7 +2489,7 @@ int vtkXdmfReader::GetParameterType(int index)
}
//----------------------------------------------------------------------------
const char *vtkXdmfReader::GetParameterTypeAsString(int index)
const char *vtkXdmfReader::GetParameterTypeAsString(int vtkNotUsed(index))
{
/*
......@@ -2501,7 +2501,7 @@ const char *vtkXdmfReader::GetParameterTypeAsString(int index)
return("LIST");
}
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterRange(int index, int Shape[3])
int vtkXdmfReader::GetParameterRange(int vtkNotUsed(index), int vtkNotUsed(Shape)[3])
{
/*
XdmfParameter *Param;
......@@ -2532,7 +2532,7 @@ int vtkXdmfReader::GetParameterRange(int index, int Shape[3])
return(0);
}
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterRange(const char *parameterName, int Shape[3])
int vtkXdmfReader::GetParameterRange(const char *vtkNotUsed(parameterName), int vtkNotUsed(Shape)[3])
{
/*
XdmfParameter *Param;
......@@ -2565,7 +2565,7 @@ int vtkXdmfReader::GetParameterRange(const char *parameterName, int Shape[3])
}
//----------------------------------------------------------------------------
const char *vtkXdmfReader::GetParameterRangeAsString(int index)
const char *vtkXdmfReader::GetParameterRangeAsString(int vtkNotUsed(index))
{
/*
int Range[3];
......@@ -2583,7 +2583,7 @@ const char *vtkXdmfReader::GetParameterRangeAsString(int index)
return(0);
}
//----------------------------------------------------------------------------
const char *vtkXdmfReader::GetParameterRangeAsString(const char *parameterName)
const char *vtkXdmfReader::GetParameterRangeAsString(const char *vtkNotUsed(parameterName))
{
/*
int Range[3];
......@@ -2601,7 +2601,7 @@ const char *vtkXdmfReader::GetParameterRangeAsString(const char *parameterName)
return(0);
}
//----------------------------------------------------------------------------
int vtkXdmfReader::SetParameterIndex(int Index, int CurrentIndex)
int vtkXdmfReader::SetParameterIndex(int vtkNotUsed(Index), int vtkNotUsed(CurrentIndex))
{
/*
XdmfParameter *Param;
......@@ -2623,7 +2623,7 @@ int vtkXdmfReader::SetParameterIndex(int Index, int CurrentIndex)
}
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterIndex(int Index)
int vtkXdmfReader::GetParameterIndex(int vtkNotUsed(Index))
{
/*
XdmfParameter *Param;
......@@ -2644,8 +2644,8 @@ int vtkXdmfReader::GetParameterIndex(int Index)
}
//----------------------------------------------------------------------------
int vtkXdmfReader::SetParameterIndex(const char *ParameterName,
int CurrentIndex)
int vtkXdmfReader::SetParameterIndex(const char *vtkNotUsed(ParameterName),
int vtkNotUsed(CurrentIndex))
{
/*
XdmfParameter *Param;
......@@ -2678,7 +2678,7 @@ int vtkXdmfReader::SetParameterIndex(const char *ParameterName,
}
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterIndex(const char *parameterName)
int vtkXdmfReader::GetParameterIndex(const char *vtkNotUsed(parameterName))
{
/*
XdmfParameter *Param;
......@@ -2699,7 +2699,7 @@ int vtkXdmfReader::GetParameterIndex(const char *parameterName)
}
//----------------------------------------------------------------------------
const char *vtkXdmfReader::GetParameterValue(const char *parameterName)
const char *vtkXdmfReader::GetParameterValue(const char *vtkNotUsed(parameterName))
{
/*
XdmfParameter *Param;
......@@ -2721,7 +2721,7 @@ const char *vtkXdmfReader::GetParameterValue(const char *parameterName)
}
//----------------------------------------------------------------------------
const char *vtkXdmfReader::GetParameterValue(int index)
const char *vtkXdmfReader::GetParameterValue(int vtkNotUsed(index))
{
/*
XdmfParameter *Param;
......@@ -2744,7 +2744,7 @@ const char *vtkXdmfReader::GetParameterValue(int index)
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterLength(int index)
int vtkXdmfReader::GetParameterLength(int vtkNotUsed(index))
{
/*
XdmfParameter *Param;
......@@ -2768,7 +2768,7 @@ int vtkXdmfReader::GetParameterLength(int index)
}
//----------------------------------------------------------------------------
int vtkXdmfReader::GetParameterLength(const char *parameterName)
int vtkXdmfReader::GetParameterLength(const char *vtkNotUsed(parameterName))
{
/*
XdmfParameter *Param;
......@@ -2864,7 +2864,7 @@ void vtkXdmfReader::UpdateNonUniformGrid(void *GridNode, char * CollectionName)
int NGrid;
vtkIdType currentGrid;
XdmfXmlNode gridNode = 0;
XdmfXmlNode domain = this->Internals->DomainPtr;
NGrid = this->DOM->FindNumberOfElements("Grid", (XdmfXmlNode)GridNode);
......
Markdown is supported
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