[Git][ghc/ghc][wip/andreask/fix_rts_warnings] Rts/elf-linker: Upcast to 64bit to satisfy format string.

Andreas Klebinger gitlab at gitlab.haskell.org
Tue Dec 1 11:05:30 UTC 2020



Andreas Klebinger pushed to branch wip/andreask/fix_rts_warnings at Glasgow Haskell Compiler / GHC


Commits:
79285cb6 by Andreas Klebinger at 2020-12-01T12:05:11+01:00
Rts/elf-linker: Upcast to 64bit to satisfy format string.

The elf size is 32bit on 32bit builds and 64 otherwise.
We just upcast to 64bits before printing now.

- - - - -


1 changed file:

- rts/linker/Elf.c


Changes:

=====================================
rts/linker/Elf.c
=====================================
@@ -904,8 +904,8 @@ ocGetNames_ELF ( ObjectCode* oc )
                    ASSERT(common_used <= common_size);
 
                    IF_DEBUG(linker,
-                            debugBelch("COMMON symbol, size %ld name %s allocated at %p\n",
-                                       symbol->elf_sym->st_size, nm, symbol->addr));
+                            debugBelch("COMMON symbol, size %llu name %s allocated at %p\n",
+                                       (long long unsigned int) symbol->elf_sym->st_size, nm, symbol->addr));
 
                    /* Pointless to do addProddableBlock() for this area,
                       since the linker should never poke around in it. */



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/79285cb614d656f2fd94e2fe1a0430e6604028bf

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/79285cb614d656f2fd94e2fe1a0430e6604028bf
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201201/e3bb2e74/attachment.html>


More information about the ghc-commits mailing list