aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-03-10 16:35:27 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-03-10 16:35:27 +0200
commit146f4d8e25149631f9418c70ab47db77bfca8c42 (patch)
treecb98a7b963b59e553478d33bda58f24a35171a6c
parent791d6bc10ec81d08324807211d968d7e37110f0b (diff)
Fix signedness warning
-rw-r--r--lib/optparse/optparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse/optparse.c b/lib/optparse/optparse.c
index 07eaa4a..6f9e4bf 100644
--- a/lib/optparse/optparse.c
+++ b/lib/optparse/optparse.c
@@ -142,7 +142,7 @@ error_s(struct optparse *st, const char *msg, const char *s)
{
const char *p = strchr(s, '=');
snprintf(st->errmsg, sizeof(st->errmsg), u8"%s ā€” ā€˜%.*sā€™", msg,
- (int)(p ? p - s : strlen(s)), s);
+ (int)(p ? (size_t)(p - s) : strlen(s)), s);
return -1;
}