Permalink
Browse files

Remove various compiler warnings

  • Loading branch information...
rouault committed Aug 4, 2015
1 parent 60bd48e commit 4672325834259b89f20161b431a04b0296f13da3
Showing with 10 additions and 19 deletions.
  1. +2 −3 maperror.c
  2. +0 −2 mapio.c
  3. +2 −6 mapogcsld.c
  4. +4 −0 mapogroutput.c
  5. +0 −3 mappostgis.c
  6. +1 −4 mapquery.c
  7. +1 −1 maputil.c
View
@@ -90,7 +90,7 @@ static char *ms_errorCodes[MS_NUMERRORCODES] = {"",
errorObj *msGetErrorObj()
{
static errorObj ms_error = {MS_NOERR, "", "", MS_FALSE, NULL};
static errorObj ms_error = {MS_NOERR, "", "", MS_FALSE, 0, NULL};
return &ms_error;
}
@@ -392,7 +392,6 @@ void msWriteErrorXML(FILE *stream)
void msWriteErrorImage(mapObj *map, char *filename, int blank)
{
imageObj *img;
rendererVTableObj *renderer;
int width=400, height=300;
int nMargin =5;
int nTextLength = 0;
@@ -442,7 +441,6 @@ void msWriteErrorImage(mapObj *map, char *filename, int blank)
}
img = msImageCreate(width,height,format,imagepath,imageurl,MS_DEFAULT_RESOLUTION,MS_DEFAULT_RESOLUTION,imagecolorptr);
renderer = MS_IMAGE_RENDERER(img);
nTextLength = strlen(errormsg);
@@ -493,6 +491,7 @@ void msWriteErrorImage(mapObj *map, char *filename, int blank)
if(LIKELY(MS_SUCCESS == msComputeTextPath(map,&ts))) {
int idontcare;
idontcare = msDrawTextSymbol(NULL,img,pnt,&ts);
(void)idontcare;
freeTextSymbol(&ts);
}
}
View
@@ -536,8 +536,6 @@ static int msIO_stdioWrite( void *cbData, void *data, int byteCount )
static void msIO_Initialize( void )
{
const char* pszStripHTTPHeader;
if( is_msIO_initialized == MS_TRUE )
return;
View
@@ -149,8 +149,6 @@ int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer, char *pszStyleLayerNa
int i, j, k, z, iClass;
int bUseSpecificLayer = 0;
const char *pszTmp = NULL;
int bFreeTemplate = 0;
int nLayerStatus = 0;
int nStatus = MS_SUCCESS;
/*const char *pszSLDNotSupported = NULL;*/
char *tmpfilename = NULL;
@@ -160,8 +158,6 @@ int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer, char *pszStyleLayerNa
char *pszTmp2 = NULL;
char *pszBuffer = NULL;
layerObj *lp = NULL;
char *pszSqlExpression=NULL;
FilterEncodingNode *psExpressionNode =NULL;
pasLayers = msSLDParseSLD(map, psSLDXML, &nLayers);
/* -------------------------------------------------------------------- */
@@ -399,7 +395,9 @@ int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer, char *pszStyleLayerNa
nStatus = MS_SUCCESS;
#ifdef notdef
sld_cleanup:
#endif
for (i=0; i<nLayers; i++)
freeLayer(&pasLayers[i]);
msFree(pasLayers);
@@ -2571,7 +2569,6 @@ int msSLDParseTextParams(CPLXMLNode *psRoot, layerObj *psLayer,
{
char szFontName[100];
double dfFontSize = 10;
int bFontSet = 0;
CPLXMLNode *psLabel=NULL, *psFont=NULL;
CPLXMLNode *psCssParam = NULL;
@@ -2724,7 +2721,6 @@ int msSLDParseTextParams(CPLXMLNode *psRoot, layerObj *psLayer,
}
if ((msLookupHashTable(&(psLayer->map->fontset.fonts), szFontName) !=NULL)) {
bFontSet = 1;
psLabelObj->font = msStrdup(szFontName);
}
}
View
@@ -529,12 +529,16 @@ static int msOGRWriteShape( layerObj *map_layer, OGRLayerH hOGRLayer,
/* msOGRStdoutWriteFunction() */
/************************************************************************/
#if defined(GDAL_COMPUTE_VERSION)
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,0,0)
/* Used by /vsistdout/ */
static size_t msOGRStdoutWriteFunction(const void* ptr, size_t size, size_t nmemb, FILE* stream)
{
msIOContext *ioctx = (msIOContext*) stream;
return msIO_contextWrite(ioctx, ptr, size * nmemb ) / size;
}
#endif
#endif
/************************************************************************/
/* msOGROutputGetAdditonalFiles() */
View
@@ -3581,9 +3581,6 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
#ifdef USE_POSTGIS
tokenListNodeObjPtr node = NULL;
int resolution; /* date/time resolution */
int noDate;
char *snippet = NULL;
char *native_string = NULL;
char *strtmpl = NULL;
View
@@ -664,7 +664,7 @@ int msQueryByFilter(mapObj *map)
layerObj *lp;
char status, eval;
char status;
char *old_filteritem=NULL;
expressionObj old_filter;
@@ -696,7 +696,6 @@ int msQueryByFilter(mapObj *map)
start = stop = map->query.layer;
for(l=start; l>=stop; l--) {
eval = MS_TRUE; /* evaluate the filter inside within this function */
lp = (GET_LAYER(map, l));
if (map->query.maxfeatures == 0)
@@ -743,8 +742,6 @@ int msQueryByFilter(mapObj *map)
old_filteritem = lp->filteritem; /* cache the existing filter/filteritem */
msInitExpression(&old_filter);
msCopyExpression(&old_filter, &lp->filter);
if(msLayerSupportsCommonFilters(lp)) eval = MS_FALSE;
/*
** Set the lp->filter and lp->filteritem (may need to merge). Remember filters are *always* MapServer syntax.
View
@@ -2162,7 +2162,6 @@ void msHSLtoRGB(double h, double s, double l, colorObj *rgb) {
*/
int msCheckParentPointer(void* p, char *objname)
{
char* fmt="The %s parent object is null";
char* msg=NULL;
if (p == NULL) {
if(objname != NULL) {
@@ -2622,4 +2621,5 @@ int msSetLayerOpacity(layerObj *layer, int opacity) {
initLayerCompositer(layer->compositer);
}
layer->compositer->opacity = opacity;
return MS_TRUE;
}

0 comments on commit 4672325

Please sign in to comment.