From 61f9a5d0b3e68ed110be2370b243450210e5001b Mon Sep 17 00:00:00 2001 From: "Roland C. Dowdeswell" Date: Tue, 14 Feb 2012 23:56:18 +0000 Subject: [PATCH] Fix compiler warnings. --- base/bsearch.c | 5 +++-- base/heimbase.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/base/bsearch.c b/base/bsearch.c index 443408c45..24fd77cfa 100644 --- a/base/bsearch.c +++ b/base/bsearch.c @@ -194,6 +194,7 @@ bsearch_common(const char *buf, size_t sz, const char *key, /* Got a line; check it */ /* Search for and split on unquoted whitespace */ + val_start = 0; for (key_start = i, key_len = 0, val_len = 0, k = i; k < rmax; k++) { if (buf[k] == '\\') { k++; @@ -204,10 +205,10 @@ bsearch_common(const char *buf, size_t sz, const char *key, key_len = k - i; break; } - if (!isspace(buf[k])) + if (!isspace((unsigned char)buf[k])) continue; - while (k < rmax && isspace(buf[k])) { + while (k < rmax && isspace((unsigned char)buf[k])) { key_len = k - i; k++; } diff --git a/base/heimbase.c b/base/heimbase.c index 1ae2b551c..51b76b9a1 100644 --- a/base/heimbase.c +++ b/base/heimbase.c @@ -788,7 +788,7 @@ heim_path_vcreate(heim_object_t ptr, size_t size, heim_object_t leaf, heim_object_t node = ptr; heim_object_t next_node = NULL; heim_tid_t node_type; - int ret; + int ret = 0; if (ptr == NULL) heim_abort("heim_path_vcreate() does not create root nodes");