Commit 5d1e6019 authored by Daniel Salzman's avatar Daniel Salzman

time: fix warning on NetBSD

parent c75c4182
......@@ -168,7 +168,7 @@ static void parse_offset(time_ctx_t *ctx)
{
ctx->offset = 0;
ctx->error = -1;
while (isdigit(*ctx->parsed)) {
while (isdigit((int)*ctx->parsed)) {
ctx->offset *= 10;
ctx->offset += *ctx->parsed++ - '0';
ctx->error = 0;
......@@ -180,7 +180,7 @@ static void parse_calendar(time_ctx_t *ctx, int index)
int *cal_arr = (int *)&ctx->calendar;
cal_arr[index] = 0;
for (size_t i = 0; i < calendar_digits(index); i++) {
if (!isdigit(*ctx->parsed)) {
if (!isdigit((int)*ctx->parsed)) {
ctx->error = -1;
return;
}
......@@ -230,7 +230,7 @@ static void parse_unit2(time_ctx_t *ctx)
switch (u) {
case 'y':
case 'd':
ctx->offset_unit = toupper(u);
ctx->offset_unit = toupper((int)u);
break;
case 'h':
case 's':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment