From: Tobias Klausmann <tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
To: Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: ML nouveau <nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 2/2] nv50/ir: fix a compiler warning with debug-only code
Date: Wed, 8 Jul 2015 21:40:08 +0200 [thread overview]
Message-ID: <559D7C98.5090102@mni.thm.de> (raw)
In-Reply-To: <CACvgo50rFAxxP8JfG_WvqTkvA74eUzfy9v-KTCSHeMSkCYO-zA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 08.07.2015 21:34, Emil Velikov wrote:
> On 8 July 2015 at 19:27, Tobias Klausmann
> <tobias.johannes.klausmann@mni.thm.de> wrote:
>> codegen/nv50_ir_emit_nv50.cpp: In member function
>> ‘void nv50_ir::CodeEmitterNV50::emitLOAD(const nv50_ir::Instruction*)’:
>> codegen/nv50_ir_emit_nv50.cpp:620:12: warning: unused variable ‘offset’
>> [-Wunused-variable]
>> int32_t offset = i->getSrc(0)->reg.data.offset;
>>
>> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
>> ---
>> src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
>> index 67ea6df..86b16f2 100644
>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
>> @@ -616,8 +616,11 @@ CodeEmitterNV50::emitLoadStoreSizeCS(DataType ty)
>> void
>> CodeEmitterNV50::emitLOAD(const Instruction *i)
>> {
>> - DataFile sf = i->src(0).getFile();
>> +#ifdef DEBUG
>> int32_t offset = i->getSrc(0)->reg.data.offset;
>> +#endif
>> +
> assert is (normally) guarded by NDEBUG. Mesa/gallium has an in-house
> replacement, which (not 100% sure) should be fine as well.
>
> -Emil
As far as i can see it in u_debug.h assert (debug_assert) is guarded by
DEBUG as the above change...
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-07-08 19:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 18:27 [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings Tobias Klausmann
[not found] ` <1436380066-19851-1-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 18:27 ` [PATCH 2/2] nv50/ir: fix a compiler warning with debug-only code Tobias Klausmann
[not found] ` <1436380066-19851-2-git-send-email-tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 19:34 ` Emil Velikov
[not found] ` <CACvgo50rFAxxP8JfG_WvqTkvA74eUzfy9v-KTCSHeMSkCYO-zA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:40 ` Tobias Klausmann [this message]
[not found] ` <559D7C98.5090102-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 20:18 ` Ilia Mirkin
2015-07-08 18:38 ` [PATCH 1/2] nouveau/compiler: fix trivial compiler warnings Ilia Mirkin
[not found] ` <CAKb7UvgWcP4765FZFApRPdUY76B1DpOqZyRxz3K5g-n85qq+1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:09 ` Tobias Klausmann
2015-07-08 19:31 ` Emil Velikov
[not found] ` <CACvgo52DmszQ4tA2FfCnXAy9vkUMse=zbgiHnNH23Mq3uR=C2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:34 ` Tobias Klausmann
[not found] ` <559D7B41.5070802-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 19:42 ` Emil Velikov
[not found] ` <CACvgo53WL88Esa9iDL=so=zj9PpkKVX90ks8zyrYUHj4Ag2oXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:53 ` Tobias Klausmann
[not found] ` <559D7FC2.5060500-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
2015-07-08 20:01 ` Ilia Mirkin
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=559D7C98.5090102@mni.thm.de \
--to=tobias.johannes.klausmann-aqjdnwhu20eelga04laivw@public.gmane.org \
--cc=emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.