diff options
context:
space:
mode:
-rw-r--r--source/ui-clone.c2
-rw-r--r--source/ui-log.c4
-rw-r--r--source/ui-shared.c2
-rw-r--r--source/ui-tree.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/source/ui-clone.c b/source/ui-clone.c
index e11f496..c554c24 100644
--- a/source/ui-clone.c
+++ b/source/ui-clone.c
@@ -115,7 +115,7 @@ void cgit_clone_objects(void)
for (p = ctx.qry.path; *p; ++p) {
if (*p == '.' && *(p + 1) == '.')
goto err;
- if (!isalnum(*p) && *p != '/' && *p != '.' && *p != '-')
+ if (!isalnum((unsigned char)*p) && *p != '/' && *p != '.' && *p != '-')
goto err;
}
diff --git a/source/ui-log.c b/source/ui-log.c
index 9906bbc..d3610d3 100644
--- a/source/ui-log.c
+++ b/source/ui-log.c
@@ -350,13 +350,13 @@ static char *next_token(char **src)
if (!src || !*src)
return NULL;
- while (isspace(**src))
+ while (isspace((unsigned char)**src))
(*src)++;
if (!**src)
return NULL;
result = *src;
while (**src) {
- if (isspace(**src)) {
+ if (isspace((unsigned char)**src)) {
**src = '\0';
(*src)++;
break;
diff --git a/source/ui-shared.c b/source/ui-shared.c
index 88e5075..4084748 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -1237,7 +1237,7 @@ void cgit_compose_snapshot_prefix(struct strbuf *filename, const char *base,
* i.e. each stripped tag can be inverted without ambiguities.
*/
if (repo_get_oid(the_repository, fmt("refs/tags/%s", ref), &oid) == 0 &&
- (ref[0] == 'v' || ref[0] == 'V') && isdigit(ref[1]) &&
+ (ref[0] == 'v' || ref[0] == 'V') && isdigit((unsigned char)ref[1]) &&
((repo_get_oid(the_repository, fmt("refs/tags/%s", ref + 1), &oid) == 0) +
(repo_get_oid(the_repository, fmt("refs/tags/v%s", ref + 1), &oid) == 0) +
(repo_get_oid(the_repository, fmt("refs/tags/V%s", ref + 1), &oid) == 0) == 1))
diff --git a/source/ui-tree.c b/source/ui-tree.c
index 9181b1b..f537442 100644
--- a/source/ui-tree.c
+++ b/source/ui-tree.c
@@ -93,7 +93,7 @@ static void print_binary_buffer(char *buf, unsigned long size)
buf[idx] & 0xff);
html(" </td><td class='hex'>");
for (idx = 0; idx < ROWLEN && ofs + idx < size; idx++)
- ascii[idx] = isgraph(buf[idx]) ? buf[idx] : '.';
+ ascii[idx] = isgraph((unsigned char)buf[idx]) ? buf[idx] : '.';
ascii[idx] = '\0';
html_txt(ascii);
html("</td></tr>\n");
@@ -271,7 +271,7 @@ static void render_ls_item(const struct object_id *oid, const char *pathname,
free(buf);
strbuf_release(&linkpath);
}
- htmlf("</td><td class='ls-size'>%li</td>", size);
+ htmlf("</td><td class='ls-size'>%lu</td>", size);
html("<td>");
cgit_log_link("log", NULL, "button", ctx.qry.head,