From 13ab03a03a429ad384423e672af21de966264ed3 Mon Sep 17 00:00:00 2001 From: Melvyn Sopacua Date: Tue, 14 Feb 2017 18:38:50 +0100 Subject: [PATCH] Fix warnings: - be consistent with (const char *) casts when assigning - use xmlStrlen instead of strlen when dealing with xmlChar * --- nominatim/import.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nominatim/import.c b/nominatim/import.c index b9341608..419ab6a5 100644 --- a/nominatim/import.c +++ b/nominatim/import.c @@ -486,7 +486,7 @@ void EndElement(xmlTextReaderPtr reader, const xmlChar *name) } paramValues[7] = (const char *)featureExtraTagString; - if (strlen(feature.parentPlaceID) == 0) + if (xmlStrlen(feature.parentPlaceID) == 0) paramValues[8] = "0"; else paramValues[8] = (const char *)feature.parentPlaceID; @@ -541,10 +541,10 @@ void EndElement(xmlTextReaderPtr reader, const xmlChar *name) if (featureNameLines) { - if (strlen(feature.parentPlaceID) > 0 && featureAddressLines == 0) + if (xmlStrlen(feature.parentPlaceID) > 0 && featureAddressLines == 0) { paramValues[0] = (const char *)place_id; - paramValues[1] = feature.parentPlaceID; + paramValues[1] = (const char *)feature.parentPlaceID; if (verbose) fprintf(stderr, "search_name_from_parent_insert: INSERT %s %s\n", paramValues[0], paramValues[1]); res = PQexecPrepared(conn, "search_name_from_parent_insert", 2, paramValues, NULL, NULL, 0); if (PQresultStatus(res) != PGRES_COMMAND_OK) -- 2.39.5