]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
linux: Use same type for MMAP2_PAGE_UNIT
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 10 Mar 2022 11:07:37 +0000 (08:07 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 20 Sep 2022 13:57:40 +0000 (10:57 -0300)
It avoid a possible compiler warning where right size of operator
is converted from a negative value to unsigned.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
sysdeps/unix/sysv/linux/arc/mmap_internal.h
sysdeps/unix/sysv/linux/ia64/mmap_internal.h
sysdeps/unix/sysv/linux/m68k/mmap_internal.h
sysdeps/unix/sysv/linux/mmap_internal.h

index d8bbcab0a1703c35cbbcc2795aaeac7dbae8c354..59e8260b5cb1ba79d6dd2f9e095050b6af052bb4 100644 (file)
@@ -20,7 +20,7 @@
 #define MMAP_ARC_INTERNAL_H
 
 /* 8K is default but determine the shift dynamically with getpagesize.  */
-#define MMAP2_PAGE_UNIT -1
+#define MMAP2_PAGE_UNIT -1ULL
 
 #include_next <mmap_internal.h>
 
index 0c0a0ced997c5988dafdf6b4f93b03c682796d64..465d589281b52f6498acb748346649b9ac2e4bda 100644 (file)
@@ -22,7 +22,7 @@
 /* Linux allows PAGE_SHIFT in range of [12-16] and expect
    mmap2 offset to be provided in based on the configured pagesize.
    Determine the shift dynamically with getpagesize.  */
-#define MMAP2_PAGE_UNIT -1
+#define MMAP2_PAGE_UNIT -1ULL
 
 #include_next <mmap_internal.h>
 
index 8e6f1ed84cbabd389bc4d4fd813cbe1aa3ea86ac..9330edfc051c52327f52364be885a8941bdfb65b 100644 (file)
@@ -22,7 +22,7 @@
 /* ColdFire and Sun 3 kernels have PAGE_SHIFT set to 13 and expect
    mmap2 offset to be provided in 8K pages.  Determine the shift
    dynamically with getpagesize.  */
-#define MMAP2_PAGE_UNIT -1
+#define MMAP2_PAGE_UNIT -1ULL
 
 #include_next <mmap_internal.h>
 
index aebf97d064f6c277c2e41b18452d616c2ef786c3..2d118b0d8a91f0704e6e08ca66a3d31bf186f873 100644 (file)
@@ -28,7 +28,7 @@
 # define MMAP2_PAGE_UNIT 4096ULL
 #endif
 
-#if MMAP2_PAGE_UNIT == -1
+#if MMAP2_PAGE_UNIT == -1ULL
 static uint64_t page_unit;
 # define MMAP_CHECK_PAGE_UNIT()                        \
   if (page_unit == 0)                          \