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/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/exec.c') diff --git a/src/exec.c b/src/exec.c index 15b3c79..cd73d6c 100644 --- a/src/exec.c +++ b/src/exec.c @@ -268,7 +268,7 @@ static int bfs_exec_openwd(struct bfs_exec *execbuf, const struct BFTW *ftwbuf) bfs_assert(execbuf->wd_fd < 0); bfs_assert(!execbuf->wd_path); - if (ftwbuf->at_fd != AT_FDCWD) { + if (ftwbuf->at_fd != (int)AT_FDCWD) { // Rely on at_fd being the immediate parent bfs_assert(xbaseoff(ftwbuf->at_path) == 0); -- cgit v1.2.3