From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 3D1B838319EF; Wed, 30 Aug 2023 12:36:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D1B838319EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693399009; bh=xKozQcgzCV8hXpeIvO21cSbfkIr6hL8fRfXqLPO5ljw=; h=From:To:Subject:Date:From; b=eyqHiEAkWzjjjqBun8hLAgF8dUtKTFYpfgBEGpOyHvDQCerQg8wUiShyQeq3vN3fM 2K5l51AUdpcWf9N5bDwIIZLZp+u8+mW6rSy0qJS1IMcIpmCNtacqF/IEZUh1MaTd6J 8lsBtp+l3iXk771nu2Vf7l5cW6C3Bw5+yyBJx1AE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] posix: Use unsigned to check for _POSIX_VDISABLE X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: e5502a8fad50f0d761a907afc1a336ae151e284a X-Git-Newrev: 2e261400d982c5f9ffe4f0e7c9382f9891e18929 Message-Id: <20230830123649.3D1B838319EF@sourceware.org> Date: Wed, 30 Aug 2023 12:36:49 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2e261400d982c5f9ffe4f0e7c9382f9891e18929 commit 2e261400d982c5f9ffe4f0e7c9382f9891e18929 Author: Adhemerval Zanella Date: Tue Mar 15 18:09:10 2022 -0300 posix: Use unsigned to check for _POSIX_VDISABLE Clang warns: ../sysdeps/posix/fpathconf.c:118:21: error: right side of operator converted from negative value to unsigned: -1 to 18446744073709551615 [-Werror] #if _POSIX_VDISABLE == -1 ~~~~~~~~~~~~~~~ ^ ~~ Diff: --- sysdeps/posix/fpathconf.c | 2 +- sysdeps/posix/pathconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c index ce432962cd..d5436e523a 100644 --- a/sysdeps/posix/fpathconf.c +++ b/sysdeps/posix/fpathconf.c @@ -115,7 +115,7 @@ __fpathconf (int fd, int name) return _POSIX_NO_TRUNC; case _PC_VDISABLE: -#if _POSIX_VDISABLE == -1 +#if _POSIX_VDISABLE == -1U # error "Invalid value for _POSIX_VDISABLE" #endif return _POSIX_VDISABLE; diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c index 2cf0ad5abf..8e15801dbf 100644 --- a/sysdeps/posix/pathconf.c +++ b/sysdeps/posix/pathconf.c @@ -113,7 +113,7 @@ __pathconf (const char *path, int name) return _POSIX_NO_TRUNC; case _PC_VDISABLE: -#if _POSIX_VDISABLE == -1 +#if _POSIX_VDISABLE == -1U # error "Invalid value for _POSIX_VDISABLE" #endif return _POSIX_VDISABLE;