Skip to content

Commit

Permalink
mapwfs11.cpp: don't assign variable that is never read (CID 1503405)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 22, 2021
1 parent f28623a commit 60fd420
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mapwfs11.cpp
Expand Up @@ -37,6 +37,8 @@

#include <string>

template<class T> inline void IGNORE_RET_VAL(T) {}

/************************************************************************/
/* msWFSException11() */
/************************************************************************/
Expand Down Expand Up @@ -207,15 +209,15 @@ xmlNodePtr msWFSDumpLayer11(mapObj *map, layerObj *lp, xmlNsPtr psNsOws,
tokens = msStringSplit(valueToFree, ' ', &n);
if (tokens && n > 0) {
if( nWFSVersion == OWS_1_1_0 )
psNode = xmlNewTextChild(psRootNode, NULL, BAD_CAST "DefaultSRS", BAD_CAST tokens[0]);
IGNORE_RET_VAL(xmlNewTextChild(psRootNode, NULL, BAD_CAST "DefaultSRS", BAD_CAST tokens[0]));
else
psNode = xmlNewTextChild(psRootNode, NULL, BAD_CAST "DefaultCRS", BAD_CAST tokens[0]);
IGNORE_RET_VAL(xmlNewTextChild(psRootNode, NULL, BAD_CAST "DefaultCRS", BAD_CAST tokens[0]));
for (i=1; i<n; i++)
{
if( nWFSVersion == OWS_1_1_0 )
psNode = xmlNewTextChild(psRootNode, NULL, BAD_CAST "OtherSRS", BAD_CAST tokens[i]);
IGNORE_RET_VAL(xmlNewTextChild(psRootNode, NULL, BAD_CAST "OtherSRS", BAD_CAST tokens[i]));
else
psNode = xmlNewTextChild(psRootNode, NULL, BAD_CAST "OtherCRS", BAD_CAST tokens[i]);
IGNORE_RET_VAL(xmlNewTextChild(psRootNode, NULL, BAD_CAST "OtherCRS", BAD_CAST tokens[i]));
}

msFreeCharArray(tokens, n);
Expand Down

0 comments on commit 60fd420

Please sign in to comment.