diff --git a/src/client.c b/src/client.c index 284ce113..fbfdad4c 100644 --- a/src/client.c +++ b/src/client.c @@ -795,7 +795,7 @@ static const char *get_strategy_plus_sort(struct client *l, const char *field) for (s = sdb->settings[PZ_SORTMAP]; s; s = s->next) { - char *p = strchr(s->name + 3, ':'); + const char *p = strchr(s->name + 3, ':'); if (!p) { yaz_log(YLOG_WARN, "Malformed sortmap name: %s", s->name); @@ -1209,7 +1209,7 @@ static CCL_bibset prepare_cclmap(struct client *cl, CCL_bibset base_bibset) for (s = sdb->settings[PZ_CCLMAP]; s; s = s->next) { const char *addinfo = 0; - char *p = strchr(s->name + 3, ':'); + const char *p = strchr(s->name + 3, ':'); if (!p) { WRBUF w = wrbuf_alloc(); diff --git a/src/normalize_cache.c b/src/normalize_cache.c index 3ae91244..c4ef9498 100644 --- a/src/normalize_cache.c +++ b/src/normalize_cache.c @@ -17,16 +17,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include #include -#if HAVE_CONFIG_H -#include -#endif - #include "ppmutex.h" #include "normalize_cache.h" diff --git a/src/normalize_record.c b/src/normalize_record.c index 0fd26aa6..7474fc36 100644 --- a/src/normalize_record.c +++ b/src/normalize_record.c @@ -17,17 +17,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include -#if HAVE_CONFIG_H -#include -#endif - #include "normalize_record.h" - #include "pazpar2_config.h" #include "service_xslt.h" #include "marcmap.h" diff --git a/src/reclists.c b/src/reclists.c index 3e89e7d5..c62f9687 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -17,13 +17,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include - #if HAVE_CONFIG_H #include #endif +#include +#include + #include #include "ppmutex.h" diff --git a/src/record.c b/src/record.c index 19b06d73..7a3fe493 100644 --- a/src/record.c +++ b/src/record.c @@ -17,15 +17,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include -#if HAVE_CONFIG_H -#include -#endif - #include "pazpar2_config.h" #include "client.h" #include "record.h" diff --git a/src/relevance.c b/src/relevance.c index 08afcf6c..c13a2958 100644 --- a/src/relevance.c +++ b/src/relevance.c @@ -322,9 +322,8 @@ static struct word_entry *word_entry_match(struct relevance *r, const char *norm_str, const char *rank, int *weight) { - int i = 1; struct word_entry *entries = r->entries; - for (; entries; entries = entries->next, i++) + for (; entries; entries = entries->next) { if (*norm_str && !strcmp(norm_str, entries->norm_str)) { diff --git a/src/settings.c b/src/settings.c index 57fe51b7..d8ff28ff 100644 --- a/src/settings.c +++ b/src/settings.c @@ -290,7 +290,7 @@ static int read_settings(const char *path, int ret = 0; DIR *d; struct dirent *de; - char *dot; + const char *dot; if (isdir(path)) {