From 9e15e076c1f3e647b1f7ed7e3c12a1f23fdbe98c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 4 Nov 2020 12:04:55 -0500 Subject: Enable -Wsign-compare to catch bugs like 726d7801 --- bftw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bftw.c') diff --git a/bftw.c b/bftw.c index 0e541c6..8d561ff 100644 --- a/bftw.c +++ b/bftw.c @@ -426,7 +426,7 @@ static int bftw_file_open(struct bftw_cache *cache, struct bftw_file *file, cons // Handle ENAMETOOLONG by manually traversing the path component-by-component // -1 to include the root, which has depth == 0 - size_t offset = base ? base->depth : -1; + size_t offset = base ? base->depth : (size_t)-1; size_t levels = file->depth - offset; if (levels < 2) { return fd; -- cgit v1.2.3