about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-15 18:09:10 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:40 -0300
commit2e9db2ac737ffdcf336a64223e8b77764003b7ce (patch)
tree8dd79182885a6dfc6ac81dd5066fa7a4428c4bc9
parent58f8b01276ed3cc692545855430dc43e4ebd3c31 (diff)
downloadglibc-2e9db2ac737ffdcf336a64223e8b77764003b7ce.tar.gz
glibc-2e9db2ac737ffdcf336a64223e8b77764003b7ce.tar.xz
glibc-2e9db2ac737ffdcf336a64223e8b77764003b7ce.zip
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
    ~~~~~~~~~~~~~~~ ^  ~~
-rw-r--r--sysdeps/posix/fpathconf.c2
-rw-r--r--sysdeps/posix/pathconf.c2
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;