diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2019-04-24 14:53:59 -0400 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2019-04-24 14:58:27 -0400 |
commit | 596179f77c803d3fc5586465f4ece6503055d035 (patch) | |
tree | fdfcfa7d2b519ba6a39ddb38527b7d79de523cfe /include/vms/eihi.h | |
parent | a59240a41ac34d91e4ef5dd8b484763639388364 (diff) | |
download | gdb-596179f77c803d3fc5586465f4ece6503055d035.zip gdb-596179f77c803d3fc5586465f4ece6503055d035.tar.gz gdb-596179f77c803d3fc5586465f4ece6503055d035.tar.bz2 |
Use "pulongest" on aarch64-tdep.c:aarch64_gdbarch_init
While trying to build GDB on i686, I found the following error:
In file included from ../../gdb/common/common-defs.h:105,
from ../../gdb/defs.h:28,
from ../../gdb/aarch64-tdep.c:21:
../../gdb/aarch64-tdep.c: In function 'gdbarch* aarch64_gdbarch_init(gdbarch_info, gdbarch_list*)':
../../gdb/aarch64-tdep.c:3176:43: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Werror=format=]
3176 | internal_error (__FILE__, __LINE__, _("VQ out of bounds: %ld (max %d)"),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gdb/common/gdb_locale.h:28:29: note: in definition of macro '_'
28 | # define _(String) gettext (String)
| ^~~~~~
../../gdb/aarch64-tdep.c:3176:64: note: format string is defined here
3176 | internal_error (__FILE__, __LINE__, _("VQ out of bounds: %ld (max %d)"),
| ~~^
| |
| long int
| %lld
This happens because aarch64-tdep.c:aarch64_gdbarch_init prints a
"uint64_t" variable using "%ld". This patch fixes the build by using
"pulongest" instead. As explained in a similar fix (commit
495143533ad95369811391c6e3c6dadd69d7dd67), this should be safe because
if aarch64-tdep.c is included in the build, then ULONGEST must be a
64-bit type.
gdb/ChangeLog:
2019-04-24 Sergio Durigan Junior <sergiodj@redhat.com>
* aarch64-tdep.c (aarch64_gdbarch_init): Use "pulongest" to print
"vq".
Diffstat (limited to 'include/vms/eihi.h')
0 files changed, 0 insertions, 0 deletions