Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Ruslan Kabatsayev <b7.10110111@gmail.com>,
	GDB Patches <gdb-patches@sourceware.org>,
	tankut.baris.aktemur@intel.com
Subject: Re: Current master fails to build on i686-pc-linux-gnu
Date: Tue, 24 Dec 2019 21:51:00 -0000	[thread overview]
Message-ID: <63b57288-985e-e09f-0449-e312b5cc6b62@simark.ca> (raw)
In-Reply-To: <CAHEcG97Y=vYXH2NeJgOYTYVygC-d5Z6=oj5yyyD5RJx5xz6nnQ@mail.gmail.com>

On 2019-12-24 3:44 p.m., Ruslan Kabatsayev wrote:
> Hello,
> 
> Building current master of binutils-gdb (commit ebd1c6d1d30; git-blame
> points to commits e35000a7f8be and d0922fcf02c6) results in some
> -Werror=format= errors on i686-pc-linux-gnu:
> 
> In file included from dwarf2read.c:47:0:
> dwarf2read.c: In function ‘bool is_valid_DW_AT_defaulted(ULONGEST)’:
> complaints.h:38:40: error: format ‘%lu’ expects argument of type ‘long
> unsigned int’, but argument 2 has type ‘ULONGEST {aka long long
> unsigned int}’ [-Werror=format=]
>   complaint_internal (FMT, ##__VA_ARGS__);  \
>                                         ^
> dwarf2read.c:15490:3: note: in expansion of macro ‘complaint’
>    complaint (_("unrecognized DW_AT_defaulted value (%lu)"), value);
>    ^~~~~~~~~
> dwarf2read.c: In function ‘bool
> is_valid_DW_AT_calling_convention_for_type(ULONGEST)’:
> complaints.h:38:40: error: format ‘%lu’ expects argument of type ‘long
> unsigned int’, but argument 2 has type ‘ULONGEST {aka long long
> unsigned int}’ [-Werror=format=]
>   complaint_internal (FMT, ##__VA_ARGS__);  \
>                                         ^
> dwarf2read.c:15869:7: note: in expansion of macro ‘complaint’
>        complaint (_("unrecognized DW_AT_calling_convention value "
>        ^~~~~~~~~
> dwarf2read.c: In function ‘bool
> is_valid_DW_AT_calling_convention_for_subroutine(ULONGEST)’:
> complaints.h:38:40: error: format ‘%lu’ expects argument of type ‘long
> unsigned int’, but argument 2 has type ‘ULONGEST {aka long long
> unsigned int}’ [-Werror=format=]
>   complaint_internal (FMT, ##__VA_ARGS__);  \
>                                         ^
> dwarf2read.c:15895:7: note: in expansion of macro ‘complaint’
>        complaint (_("unrecognized DW_AT_calling_convention value "
>        ^~~~~~~~~
> 
> Regards,
> Ruslan

Sorry about that, I failed to catch it during review.  The fix is simple,
these should use pulongest (value) with the format specifier "%s".  I don't
really have time right now to fix it.  If you'd like to make a patch, please
go ahead and push it.

Simon


  reply	other threads:[~2019-12-24 21:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24 20:44 Ruslan Kabatsayev
2019-12-24 21:51 ` Simon Marchi [this message]
2019-12-25 21:16   ` Ruslan Kabatsayev
2019-12-26 15:40     ` Simon Marchi
2019-12-27 17:23     ` Aktemur, Tankut Baris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63b57288-985e-e09f-0449-e312b5cc6b62@simark.ca \
    --to=simark@simark.ca \
    --cc=b7.10110111@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tankut.baris.aktemur@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox