From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 4B5363858403; Fri, 9 Feb 2024 17:31:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B5363858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707499878; bh=JXwkTlc8xpUGFy1yu+CXn3cwMP5zPUnvH2KNWAov3YM=; h=From:To:Subject:Date:From; b=tj4ImbibCY8SNIaDIGSD2XW6vsZSkY7H0TZOyUHZ4PLuuevyUIkNCXzMybDMX2h5+ T8y5uqV0yT/8cXA/qjSZeS+ejReTn5K+wTsN6hmJmEYb8FpE9tPjaMoy0QgZTfT9FU unAnqYdf+LEx+s8sFSYkiIrUy9ATQNFojP9tJkL0= 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: 478f60ee74804c4ab9521104379ea44622dd8470 X-Git-Newrev: a43d325cc76b8bd37b92c1b6814eba54ce3ff6b9 Message-Id: <20240209173118.4B5363858403@sourceware.org> Date: Fri, 9 Feb 2024 17:31:17 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a43d325cc76b8bd37b92c1b6814eba54ce3ff6b9 commit a43d325cc76b8bd37b92c1b6814eba54ce3ff6b9 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;