From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 39A2B385828E; Wed, 7 Feb 2024 14:06:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39A2B385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707314798; bh=GFvpaeQ7g/4gQqfSJ33gWz6hkGkXc7JLMTyX8gpn6Cs=; h=From:To:Subject:Date:From; b=CKwvA922MvKYWjT8nm0JrUMqL6lkbokET1lyTi1PdXgabFlnCaSzISQltdJmt+NPT 2z0HUn+F2gY3kZPXTLPjSZeh0XC/imOOVxEWFAcE9vibXmVu/Ti9uo70BTAenAlRSY K6BidMlxPrBpPoRQbzcd9n6pt3XnWeIpoyi8TVrI= 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: a0938bd5aaf47c8bd1e1958df758d6b0bb72e7a0 X-Git-Newrev: 08e7d9f975c16dd1e1cb63bcb935fa61d56356d5 Message-Id: <20240207140638.39A2B385828E@sourceware.org> Date: Wed, 7 Feb 2024 14:06:38 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=08e7d9f975c16dd1e1cb63bcb935fa61d56356d5 commit 08e7d9f975c16dd1e1cb63bcb935fa61d56356d5 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 3284e88b8e..f7b68da779 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 2a17082301..61d7469acc 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;