public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] readline/util.c: use '%d' instead of 'ld' to avoid compiling warning
@ 2014-05-30 17:02 Chen Gang
  0 siblings, 0 replies; 9+ messages in thread
From: Chen Gang @ 2014-05-30 17:02 UTC (permalink / raw)
  To: Pedro Alves
  Cc: jan.kratochvil, drow, amodra, brobecker, muller, nickc, macro, binutils

On 05/30/2014 04:27 PM, Pedro Alves wrote:
> On 05/30/2014 03:50 AM, Chen Gang wrote:
> 
>> If we have a tool to tell members (especially new members) the related
>> mailing addresses (e.g. "scripts/get_maintainer.pl" under Linux kernel
>> and/or Qemu), that will be cool!
> 
> I agree.  If you'd like to contribute one, it'll be gladly accepted.
> The information can currently be found in the MAINTAINERS files
> in the several directories in the tree.
> 

I am glad to. I am not quite familiar with perl, but it is not the
excuse to let myself stop -- I shall try.

At present, I am scanning binutils for all compiling warnings, and try
to fix them. I guess I need about 1-2 month (I am not quite familiar
with binutils, either have no enough free time for it).

So may I finish scanning warnings, then try "get_maintainers.pl"? (also
welcome any members to scan warnings and/or try "get_maintainers.pl")


[...]

Thanks.
-- 
Chen Gang

Open, share and attitude like air, water and life which God blessed

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH] readline/util.c: use '%d' instead of 'ld' to avoid compiling warning
@ 2014-05-30  0:11 Chen Gang
  2014-05-30  2:15 ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: Chen Gang @ 2014-05-30  0:11 UTC (permalink / raw)
  To: jan.kratochvil, drow, ezannoni, brobecker, muller, palves, nickc,
	macro, clm, amodra
  Cc: binutils

getpid() will return 'pid_t' which is always 'int', so need use '%d'
instead of '%ld' in sprintf().

The related warning (cross-compile aarch64):

  ../../binutils-gdb/readline/util.c: In function ‘_rl_tropen’:
  ../../binutils-gdb/readline/util.c:510:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘__pid_t’ [-Wformat]


Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 readline/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readline/util.c b/readline/util.c
index 321dee2..05c8abc 100644
--- a/readline/util.c
+++ b/readline/util.c
@@ -507,7 +507,7 @@ _rl_tropen ()
 
   if (_rl_tracefp)
     fclose (_rl_tracefp);
-  sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid());
+  sprintf (fnbuf, "/var/tmp/rltrace.%d", getpid());
   unlink(fnbuf);
   _rl_tracefp = fopen (fnbuf, "w+");
   return _rl_tracefp != 0;
-- 
1.9.2.459.g68773ac

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-09-15 11:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-30 17:02 [PATCH] readline/util.c: use '%d' instead of 'ld' to avoid compiling warning Chen Gang
  -- strict thread matches above, loose matches on Subject: below --
2014-05-30  0:11 Chen Gang
2014-05-30  2:15 ` Alan Modra
2014-05-30  2:22   ` Alan Modra
2014-05-30  2:28     ` Chen Gang
2014-05-30  2:50   ` Chen Gang
2014-05-30  8:27     ` Pedro Alves
     [not found]       ` <87lhtj7han.fsf@igel.home>
2014-05-30 16:43         ` Chen Gang
2014-09-15 11:14           ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).