diff options
author | Jiangshuai Li <jiangshuai_li@linux.alibaba.com> | 2022-08-09 10:13:57 +0800 |
---|---|---|
committer | Jiangshuai Li <jiangshuai_li@linux.alibaba.com> | 2022-08-09 10:13:57 +0800 |
commit | 65c9841b6fee984714509acef6e52366363072b6 (patch) | |
tree | 2f3d3e43a63d96e302cb5215515472ad664af8dd | |
parent | ded48050c19175535b2c6c6005313af4eaf164e7 (diff) | |
download | gdb-65c9841b6fee984714509acef6e52366363072b6.zip gdb-65c9841b6fee984714509acef6e52366363072b6.tar.gz gdb-65c9841b6fee984714509acef6e52366363072b6.tar.bz2 |
gdb/csky fix build error in ubuntu20_04
build error in: https://builder.sourceware.org/buildbot/#/builders/170/builds/246
...
../../binutils-gdb/gdb/csky-linux-tdep.c: In function ‘void
csky_supply_fregset(const regset*, regcache*, int, const void*, size_t)’:
../../binutils-gdb/gdb/csky-linux-tdep.c:194:18: error: format ‘%ld’
expects argument of type ‘long int’, but argument 2 has type ‘size_t’
{aka ‘unsigned int’} [-Werror=format=]
194 | warning (_("Unknow size %ld of section .reg2, can not get
value"
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195 | " of float registers."), len);
...
Fix it via using %s vs pulongest suggested by Tom.
-rw-r--r-- | gdb/csky-linux-tdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/csky-linux-tdep.c b/gdb/csky-linux-tdep.c index 106f629..ae5d2bb 100644 --- a/gdb/csky-linux-tdep.c +++ b/gdb/csky-linux-tdep.c @@ -191,8 +191,8 @@ csky_supply_fregset (const struct regset *regset, } else { - warning (_("Unknow size %ld of section .reg2, can not get value" - " of float registers."), len); + warning (_("Unknow size %s of section .reg2, can not get value" + " of float registers."), pulongest (len)); } } @@ -272,8 +272,8 @@ csky_collect_fregset (const struct regset *regset, } else { - warning (_("Unknow size %ld of section .reg2, will not set value" - " of float registers."), len); + warning (_("Unknow size %s of section .reg2, will not set value" + " of float registers."), pulongest (len)); } } |