* [Qemu-devel] [PATCH] cris: remove a write-only variable
@ 2011-01-09 16:56 Blue Swirl
2011-01-10 9:06 ` [Qemu-devel] " Edgar E. Iglesias
0 siblings, 1 reply; 3+ messages in thread
From: Blue Swirl @ 2011-01-09 16:56 UTC (permalink / raw)
To: Edgar E. Iglesias, qemu-devel
Avoid a warning with GCC 4.6.0:
/src/qemu/target-cris/translate.c: In function 'gen_intermediate_code_internal':
/src/qemu/target-cris/translate.c:3185:25: error: variable
'orig_flags' set but not used [-Werror=unused-but-set-variable]
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
target-cris/translate.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target-cris/translate.c b/target-cris/translate.c
index 5184155..21983eb 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -3182,7 +3182,7 @@ gen_intermediate_code_internal(CPUState *env,
TranslationBlock *tb,
{
uint16_t *gen_opc_end;
uint32_t pc_start;
- unsigned int insn_len, orig_flags;
+ unsigned int insn_len;
int j, lj;
struct DisasContext ctx;
struct DisasContext *dc = &ctx;
@@ -3224,8 +3224,8 @@ gen_intermediate_code_internal(CPUState *env,
TranslationBlock *tb,
dc->cc_size_uptodate = -1;
/* Decode TB flags. */
- orig_flags = dc->tb_flags = tb->flags & (S_FLAG | P_FLAG | U_FLAG \
- | X_FLAG | PFIX_FLAG);
+ dc->tb_flags = tb->flags & (S_FLAG | P_FLAG | U_FLAG | X_FLAG \
+ | PFIX_FLAG);
dc->delayed_branch = !!(tb->flags & 7);
if (dc->delayed_branch)
dc->jmp = JMP_INDIRECT;
--
1.6.2.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] cris: remove a write-only variable
2011-01-09 16:56 [Qemu-devel] [PATCH] cris: remove a write-only variable Blue Swirl
@ 2011-01-10 9:06 ` Edgar E. Iglesias
2011-01-10 21:41 ` Blue Swirl
0 siblings, 1 reply; 3+ messages in thread
From: Edgar E. Iglesias @ 2011-01-10 9:06 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Sun, Jan 09, 2011 at 04:56:59PM +0000, Blue Swirl wrote:
> Avoid a warning with GCC 4.6.0:
> /src/qemu/target-cris/translate.c: In function 'gen_intermediate_code_internal':
> /src/qemu/target-cris/translate.c:3185:25: error: variable
> 'orig_flags' set but not used [-Werror=unused-but-set-variable]
Hi,
Looks good but you are using spaces in a tab only file. I don't mind
much but it's maybe better to switch to entirely to spaces or not
at all.
Cheers
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
> target-cris/translate.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/target-cris/translate.c b/target-cris/translate.c
> index 5184155..21983eb 100644
> --- a/target-cris/translate.c
> +++ b/target-cris/translate.c
> @@ -3182,7 +3182,7 @@ gen_intermediate_code_internal(CPUState *env,
> TranslationBlock *tb,
> {
> uint16_t *gen_opc_end;
> uint32_t pc_start;
> - unsigned int insn_len, orig_flags;
> + unsigned int insn_len;
> int j, lj;
> struct DisasContext ctx;
> struct DisasContext *dc = &ctx;
> @@ -3224,8 +3224,8 @@ gen_intermediate_code_internal(CPUState *env,
> TranslationBlock *tb,
> dc->cc_size_uptodate = -1;
>
> /* Decode TB flags. */
> - orig_flags = dc->tb_flags = tb->flags & (S_FLAG | P_FLAG | U_FLAG \
> - | X_FLAG | PFIX_FLAG);
> + dc->tb_flags = tb->flags & (S_FLAG | P_FLAG | U_FLAG | X_FLAG \
> + | PFIX_FLAG);
> dc->delayed_branch = !!(tb->flags & 7);
> if (dc->delayed_branch)
> dc->jmp = JMP_INDIRECT;
> --
> 1.6.2.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] cris: remove a write-only variable
2011-01-10 9:06 ` [Qemu-devel] " Edgar E. Iglesias
@ 2011-01-10 21:41 ` Blue Swirl
0 siblings, 0 replies; 3+ messages in thread
From: Blue Swirl @ 2011-01-10 21:41 UTC (permalink / raw)
To: Edgar E. Iglesias; +Cc: qemu-devel
On Mon, Jan 10, 2011 at 9:06 AM, Edgar E. Iglesias
<edgar.iglesias@gmail.com> wrote:
> On Sun, Jan 09, 2011 at 04:56:59PM +0000, Blue Swirl wrote:
>> Avoid a warning with GCC 4.6.0:
>> /src/qemu/target-cris/translate.c: In function 'gen_intermediate_code_internal':
>> /src/qemu/target-cris/translate.c:3185:25: error: variable
>> 'orig_flags' set but not used [-Werror=unused-but-set-variable]
>
> Hi,
>
> Looks good but you are using spaces in a tab only file. I don't mind
> much but it's maybe better to switch to entirely to spaces or not
> at all.
OK, I'll leave this to you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-10 21:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-09 16:56 [Qemu-devel] [PATCH] cris: remove a write-only variable Blue Swirl
2011-01-10 9:06 ` [Qemu-devel] " Edgar E. Iglesias
2011-01-10 21:41 ` Blue Swirl
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 NNTP newsgroup(s).