From cf9230659e8d64e95209a4d57cbda8a474049ddb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 17 May 2024 16:10:00 -0400 Subject: Cast AT_FDCWD to int for comparisons Some platforms define AT_FDCWD to a constant like 0xFFFAFDCD that gets typed as an unsigned int. --- src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index 49028b7..4fcda60 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1270,7 +1270,7 @@ static void debug_stat(const struct bfs_ctx *ctx, const struct BFTW *ftwbuf, enu bfs_debug_prefix(ctx, DEBUG_STAT); fprintf(stderr, "bfs_stat("); - if (ftwbuf->at_fd == AT_FDCWD) { + if (ftwbuf->at_fd == (int)AT_FDCWD) { fprintf(stderr, "AT_FDCWD"); } else { size_t baselen = strlen(ftwbuf->path) - strlen(ftwbuf->at_path); -- cgit v1.2.3