From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [patch] sim: constify sim_fpu_print_status
Date: Sat, 10 Apr 2010 20:29:00 -0000 [thread overview]
Message-ID: <201004101629.28634.vapier@gentoo.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
I've committed the following patch as obvious. The local "prefix" variable is
only assigned const strings, and only passed to printf() functions, so add
"const" to avoid gcc warnings:
common/sim-fpu.c: In function 'sim_fpu_print_status':
common/sim-fpu.c:2508: warning: initialization discards qualifiers from
pointer target type
common/sim-fpu.c:2566: warning: assignment discards qualifiers from pointer
target type
-mike
2010-04-10 Mike Frysinger <vapier@gentoo.org>
* sim-fpu.c (sim_fpu_print_status): Add const markings to local
"prefix" var.
RCS file: /cvs/src/src/sim/common/sim-fpu.c,v
retrieving revision 1.17
diff -u -p -r1.17 sim-fpu.c
--- sim/common/sim-fpu.c 10 Apr 2010 08:26:45 -0000 1.17
+++ sim/common/sim-fpu.c 10 Apr 2010 20:25:45 -0000
@@ -2497,7 +2497,7 @@ sim_fpu_print_status (int status,
void *arg)
{
int i = 1;
- char *prefix = "";
+ const char *prefix = "";
while (status >= i)
{
switch ((sim_fpu_status) (status & i))
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2010-04-10 20:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-10 20:29 Mike Frysinger [this message]
2010-04-10 21:25 ` Mike Frysinger
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=201004101629.28634.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/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