xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 7 15:07:47 UTC 2025


 os/backtrace.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e0588d2110a2eeac6d3456ff8e0bbf64f43e91db
Author: Doug Johnson <dougvj at gmail.com>
Date:   Tue Jan 14 22:52:01 2025 +0000

    os: backtrace: Fix -Wincompatible-pointer-types compiler error on 32-bit targets
    
    ```
    ../os/backtrace.c: In function ‘print_registers’:
    ../os/backtrace.c:94:52: error: passing argument 3 of ‘_ULarm_get_reg’ from incompatible pointer type [-Wincompatible-pointer-types]
       94 |         ret = unw_get_reg(&cursor, regs[i].regnum, &val);
          |                                                    ^~~~
          |                                                    |
          |                                                    uint64_t * {aka long long unsigned int *}
    ```
    Switched to libunwind's un_word_t type and PRIxPTR fprintf fmt specification
    
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1763>

diff --git a/os/backtrace.c b/os/backtrace.c
index 421d9fae4..aaa27d29e 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -90,13 +90,13 @@ print_registers(int frame, unw_cursor_t cursor)
     ErrorF("Registers at frame #%d:\n", frame);
 
     for (i = 0; i < num_regs; i++) {
-        uint64_t val;
+        unw_word_t val;
         ret = unw_get_reg(&cursor, regs[i].regnum, &val);
         if (ret < 0) {
             ErrorF("unw_get_reg(%s) failed: %s [%d]\n",
                           regs[i].name, unw_strerror(ret), ret);
         } else {
-            ErrorF("  %s: 0x%" PRIx64 "\n", regs[i].name, val);
+            ErrorF("  %s: 0x%" PRIxPTR "\n", regs[i].name, val);
         }
     }
 }


More information about the xorg-commit mailing list