Permalink
Browse files

Fix various warnings found by -Wall (mainly linked to functions with …

…variadic arguments)
  • Loading branch information...
1 parent 029af71 commit 99d76f01f9c4ee43c08006cc4f41e353355c517d @rouault rouault committed Jul 7, 2013
Showing with 17 additions and 17 deletions.
  1. +1 −1 mapchart.c
  2. +1 −1 mapogcsos.c
  3. +1 −1 mapogroutput.c
  4. +4 −4 mappostgis.c
  5. +1 −1 mapuvraster.c
  6. +4 −4 mapwcs20.c
  7. +3 −3 mapwfs.c
  8. +1 −1 mapwfslayer.c
  9. +1 −1 mapwms.c
View
@@ -323,7 +323,7 @@ int pieLayerProcessDynamicDiameter(layerObj *layer)
}
/* clean up the class added temporarily */
-int pieLayerCleanupDynamicDiameter(layerObj *layer)
+static void pieLayerCleanupDynamicDiameter(layerObj *layer)
{
if( layer->numclasses > 0 && EQUALN(layer->class[layer->numclasses - 1]->name, "__MS_SIZE_ATTRIBUTE_", 20) ) {
classObj *c=msRemoveClass(layer, layer->numclasses - 1);
View
@@ -1164,7 +1164,7 @@ int msSOSGetCapabilities(mapObj *map, sosParamsObj *sosparams, cgiRequestObj *re
iVersion = msOWSParseVersionString(tokens[i]);
if (iVersion == -1) {
- msSetError(MS_SOSERR, "Invalid version format.", "msSOSGetCapabilities()", tokens[i]);
+ msSetError(MS_SOSERR, "Invalid version format : %s.", "msSOSGetCapabilities()", tokens[i]);
msFreeCharArray(tokens, j);
return msSOSException(map, "acceptversions", "VersionNegotiationFailed");
}
View
@@ -196,7 +196,7 @@ static void msOGRCleanupDS( const char *datasource_name )
/* msOGRSetPoints() */
/************************************************************************/
-static int msOGRSetPoints( OGRGeometryH hGeom, lineObj *line, int bWant2DOutput)
+static void msOGRSetPoints( OGRGeometryH hGeom, lineObj *line, int bWant2DOutput)
{
int i;
if( bWant2DOutput )
View
@@ -1729,7 +1729,7 @@ char *msPostGISBuildSQLSRID(layerObj *layer)
char *strSRIDTemplate = "find_srid('','%s','%s')";
char *pos = strstr(layerinfo->fromsource, " ");
if( layer->debug > 1 ) {
- msDebug("msPostGISBuildSQLSRID: Building find_srid line.\n", strSRID);
+ msDebug("msPostGISBuildSQLSRID: Building find_srid line.\n");
}
if ( ! pos ) {
@@ -2532,7 +2532,7 @@ int msPostGISLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
/* Something went wrong. */
if (!pgresult || PQresultStatus(pgresult) != PGRES_TUPLES_OK) {
if ( layer->debug ) {
- msDebug("Error (%s) executing query: %s", "msPostGISLayerWhichShapes()\n", PQerrorMessage(layerinfo->pgconn), strSQL);
+ msDebug("msPostGISLayerWhichShapes(): Error (%s) executing query: %s\n", PQerrorMessage(layerinfo->pgconn), strSQL);
}
msSetError(MS_QUERYERR, "Error executing query: %s ", "msPostGISLayerWhichShapes()", PQerrorMessage(layerinfo->pgconn));
free(strSQL);
@@ -2713,7 +2713,7 @@ int msPostGISLayerGetShape(layerObj *layer, shapeObj *shape, resultObj *record)
/* Something went wrong. */
if ( (!pgresult) || (PQresultStatus(pgresult) != PGRES_TUPLES_OK) ) {
if ( layer->debug ) {
- msDebug("Error (%s) executing SQL: %s", "msPostGISLayerGetShape()\n", PQerrorMessage(layerinfo->pgconn), strSQL );
+ msDebug("msPostGISLayerGetShape(): Error (%s) executing SQL: %s\n", PQerrorMessage(layerinfo->pgconn), strSQL );
}
msSetError(MS_QUERYERR, "Error executing SQL: %s", "msPostGISLayerGetShape()", PQerrorMessage(layerinfo->pgconn));
@@ -2939,7 +2939,7 @@ int msPostGISLayerGetItems(layerObj *layer)
if ( (!pgresult) || (PQresultStatus(pgresult) != PGRES_TUPLES_OK) ) {
if ( layer->debug ) {
- msDebug("Error (%s) executing SQL: %s", "msPostGISLayerGetItems()\n", PQerrorMessage(layerinfo->pgconn), sql);
+ msDebug("msPostGISLayerGetItems(): Error (%s) executing SQL: %s\n", PQerrorMessage(layerinfo->pgconn), sql);
}
msSetError(MS_QUERYERR, "Error executing SQL: %s", "msPostGISLayerGetItems()", PQerrorMessage(layerinfo->pgconn));
if (pgresult) {
View
@@ -435,7 +435,7 @@ int msUVRASTERLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
}
if (msDrawRasterLayerLow(&map_tmp, layer, image_tmp, NULL ) == MS_FAILURE) {
- msSetError(MS_MISCERR, "Unable to draw raster data.", NULL, "msUVRASTERLayerWhichShapes()" );
+ msSetError(MS_MISCERR, "Unable to draw raster data.", "msUVRASTERLayerWhichShapes()" );
return MS_FAILURE;
}
View
@@ -546,7 +546,7 @@ static int msWCSParseResolutionString20(char *string,
number = strchr(string, '(');
if(NULL == number) {
- msSetError(MS_WCSERR, "Invalid resolution parameter value.",
+ msSetError(MS_WCSERR, "Invalid resolution parameter value : %s.",
"msWCSParseSize20()", string);
return MS_FAILURE;
}
@@ -567,8 +567,8 @@ static int msWCSParseResolutionString20(char *string,
if(msStringParseDouble(number, outResolution) != MS_SUCCESS) {
*outResolution = MS_WCS20_UNBOUNDED;
- msSetError(MS_WCSERR, "Invalid resolution parameter value.",
- "msWCSParseSize20()", string);
+ msSetError(MS_WCSERR, "Invalid resolution parameter value : %s.",
+ "msWCSParseSize20()", number);
return MS_FAILURE;
}
@@ -807,7 +807,7 @@ static int msWCSParseRequest20_XMLGetCoverage(
if(NULL == (axisName = (char *) xmlGetProp(child, BAD_CAST "dimension"))) {
msSetError(MS_WCSERR, "Attribute 'dimension' is missing "
"in element 'Resolution'.",
- "msWCSParseRequest20_XMLGetCoverage()", (char *)child->name);
+ "msWCSParseRequest20_XMLGetCoverage()");
return MS_FAILURE;
}
View
@@ -616,7 +616,7 @@ int msWFSGetCapabilities(mapObj *map, wfsParamsObj *wfsparams, cgiRequestObj *re
iVersion = msOWSParseVersionString(tokens[i]);
if (iVersion == -1) {
- msSetError(MS_WFSERR, "Invalid version format.", "msWFSGetCapabilities()", tokens[i]);
+ msSetError(MS_WFSERR, "Invalid version format : %s.", "msWFSGetCapabilities()", tokens[i]);
msFreeCharArray(tokens, j);
return msWFSException(map, "acceptversions", "VersionNegotiationFailed",wmtver);
}
@@ -1541,7 +1541,7 @@ static int msWFSGetFeature_GMLPostfix( mapObj *map,
msIO_printf("</wfs:FeatureCollection>\n\n");
else {
if(paramsObj->pszVersion && strncmp(paramsObj->pszVersion,"1.1",3) == 0)
- msIO_printf("</wfs:FeatureCollection>\n\n", gmlinfo->user_namespace_prefix, gmlinfo->collection_name);
+ msIO_printf("</wfs:FeatureCollection>\n\n");
else
msIO_printf("</%s:%s>\n\n", gmlinfo->user_namespace_prefix, gmlinfo->collection_name);
}
@@ -2126,7 +2126,7 @@ this request. Check wfs/ows_enable_request settings.", "msWFSGetFeature()", laye
ms_error = msGetErrorObj();
if(ms_error->code != MS_NOTFOUND) {
- msSetError(MS_WFSERR, "FLTApplyFilterToLayer() failed", "msWFSGetFeature()", pszFilter);
+ msSetError(MS_WFSERR, "FLTApplyFilterToLayer() failed", "msWFSGetFeature()");
return msWFSException(map, "mapserv", "NoApplicableCode", paramsObj->pszVersion);
}
}
View
@@ -68,7 +68,7 @@ static wfsParamsObj *msBuildRequestParams(mapObj *map, layerObj *lp,
rectObj bbox;
const char *pszTmp;
int nLength, i = 0;
- char *pszVersion, *pszTypeName, *pszGeometryName = NULL;
+ char *pszVersion, *pszTypeName;
if (!map || !lp || !bbox_ret)
return NULL;
View
@@ -766,7 +766,7 @@ int msWMSApplyDimension(layerObj *lp, int version, char *dimensionname, char *va
}
} else
msSetError(MS_WMSERR, "Dimension %s : invalid settings. Make sure that item, units and extent are set.", "msWMSApplyDimension",
- dimension, currentvalue);
+ dimension);
msFree(dimensionitemname);
msFree(dimensionextentname);

0 comments on commit 99d76f0

Please sign in to comment.