* [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard
@ 2018-11-08 12:52 Peter Maydell
2018-11-08 12:57 ` Marc-André Lureau
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Peter Maydell @ 2018-11-08 12:52 UTC (permalink / raw)
To: qemu-devel; +Cc: patches, Richard Henderson
The tcg-op.h header was missing the usual guard against multiple
inclusion; add it.
(Spotted by lgtm.com's static analyzer.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
tcg/tcg-op.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index 7513c1eb7c5..db4e9188f42 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -22,6 +22,9 @@
* THE SOFTWARE.
*/
+#ifndef TCG_TCG_OP_H
+#define TCG_TCG_OP_H
+
#include "tcg.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
@@ -1267,3 +1270,5 @@ static inline void tcg_gen_trunc_ptr_i32(TCGv_i32 r, TCGv_ptr a)
#undef PTR
#undef NAT
+
+#endif /* TCG_TCG_OP_H */
--
2.19.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard
2018-11-08 12:52 [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard Peter Maydell
@ 2018-11-08 12:57 ` Marc-André Lureau
2018-11-08 13:08 ` Philippe Mathieu-Daudé
2018-11-08 13:39 ` Richard Henderson
2 siblings, 0 replies; 7+ messages in thread
From: Marc-André Lureau @ 2018-11-08 12:57 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU, Richard Henderson, patches
On Thu, Nov 8, 2018 at 4:53 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> The tcg-op.h header was missing the usual guard against multiple
> inclusion; add it.
>
> (Spotted by lgtm.com's static analyzer.)
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> tcg/tcg-op.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
> index 7513c1eb7c5..db4e9188f42 100644
> --- a/tcg/tcg-op.h
> +++ b/tcg/tcg-op.h
> @@ -22,6 +22,9 @@
> * THE SOFTWARE.
> */
>
> +#ifndef TCG_TCG_OP_H
> +#define TCG_TCG_OP_H
> +
> #include "tcg.h"
> #include "exec/helper-proto.h"
> #include "exec/helper-gen.h"
> @@ -1267,3 +1270,5 @@ static inline void tcg_gen_trunc_ptr_i32(TCGv_i32 r, TCGv_ptr a)
>
> #undef PTR
> #undef NAT
> +
> +#endif /* TCG_TCG_OP_H */
> --
> 2.19.1
>
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard
2018-11-08 12:52 [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard Peter Maydell
2018-11-08 12:57 ` Marc-André Lureau
@ 2018-11-08 13:08 ` Philippe Mathieu-Daudé
2018-11-08 13:17 ` Peter Maydell
2018-11-08 13:39 ` Richard Henderson
2 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-08 13:08 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Richard Henderson, patches
On 8/11/18 13:52, Peter Maydell wrote:
> The tcg-op.h header was missing the usual guard against multiple
> inclusion; add it.
>
> (Spotted by lgtm.com's static analyzer.)
I'm pretty sure there are more occurences.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> tcg/tcg-op.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
> index 7513c1eb7c5..db4e9188f42 100644
> --- a/tcg/tcg-op.h
> +++ b/tcg/tcg-op.h
> @@ -22,6 +22,9 @@
> * THE SOFTWARE.
> */
>
> +#ifndef TCG_TCG_OP_H
> +#define TCG_TCG_OP_H
> +
> #include "tcg.h"
> #include "exec/helper-proto.h"
> #include "exec/helper-gen.h"
> @@ -1267,3 +1270,5 @@ static inline void tcg_gen_trunc_ptr_i32(TCGv_i32 r, TCGv_ptr a)
>
> #undef PTR
> #undef NAT
> +
> +#endif /* TCG_TCG_OP_H */
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard
2018-11-08 13:08 ` Philippe Mathieu-Daudé
@ 2018-11-08 13:17 ` Peter Maydell
2018-11-08 14:08 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2018-11-08 13:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: QEMU Developers, Richard Henderson, patches@linaro.org
On 8 November 2018 at 13:08, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> On 8/11/18 13:52, Peter Maydell wrote:
>>
>> The tcg-op.h header was missing the usual guard against multiple
>> inclusion; add it.
>>
>> (Spotted by lgtm.com's static analyzer.)
>
>
> I'm pretty sure there are more occurences.
The only other ones the analyzer spotted all seemed to be
"deliberately multiply included" (like
include/exec/memory_ldst_phys.inc.h), though we don't in
all cases use the ".inc.h" convention that sort-of
indicates that).
https://lgtm.com/projects/g/qemu/qemu/alerts/?mode=tree
is probably the most convenient url if you want to
go looking for other stuff. Some of its issues are
definitely false-positives, but there may be some other
easy to fix things in there (eg the "local variable
hides global variable" ones -- though if we care about
these we should enable -Wshadow and fix the compile
failures).
Notably, lgtm does checks on python, which Coverity does not,
so that is more likely to be a source of real issues to fix,
I think.
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard
2018-11-08 12:52 [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard Peter Maydell
2018-11-08 12:57 ` Marc-André Lureau
2018-11-08 13:08 ` Philippe Mathieu-Daudé
@ 2018-11-08 13:39 ` Richard Henderson
2018-11-08 15:53 ` Peter Maydell
2 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2018-11-08 13:39 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: patches
On 11/8/18 1:52 PM, Peter Maydell wrote:
> The tcg-op.h header was missing the usual guard against multiple
> inclusion; add it.
>
> (Spotted by lgtm.com's static analyzer.)
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> tcg/tcg-op.h | 5 +++++
> 1 file changed, 5 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
FWIW, while I can queue this, I do not have any other outstanding tcg patches.
So maybe just apply it to master directly?
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard
2018-11-08 13:17 ` Peter Maydell
@ 2018-11-08 14:08 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-08 14:08 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers, Richard Henderson, patches@linaro.org
On 8/11/18 14:17, Peter Maydell wrote:
> On 8 November 2018 at 13:08, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>> On 8/11/18 13:52, Peter Maydell wrote:
>>>
>>> The tcg-op.h header was missing the usual guard against multiple
>>> inclusion; add it.
>>>
>>> (Spotted by lgtm.com's static analyzer.)
>>
>>
>> I'm pretty sure there are more occurences.
>
> The only other ones the analyzer spotted all seemed to be
> "deliberately multiply included" (like
> include/exec/memory_ldst_phys.inc.h), though we don't in
> all cases use the ".inc.h" convention that sort-of
> indicates that).
>
> https://lgtm.com/projects/g/qemu/qemu/alerts/?mode=tree
> is probably the most convenient url if you want to
> go looking for other stuff. Some of its issues are
> definitely false-positives, but there may be some other
> easy to fix things in there (eg the "local variable
> hides global variable" ones -- though if we care about
> these we should enable -Wshadow and fix the compile
> failures).
>
> Notably, lgtm does checks on python, which Coverity does not,
> so that is more likely to be a source of real issues to fix,
> I think.
Thanks for the pointer.
This stats are funny^H^H^H^Hscary:
https://lgtm.com/blog/best_email_domain#What%20about%20the%20free%20email%20providers?
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard
2018-11-08 13:39 ` Richard Henderson
@ 2018-11-08 15:53 ` Peter Maydell
0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2018-11-08 15:53 UTC (permalink / raw)
To: Richard Henderson; +Cc: QEMU Developers, patches@linaro.org
On 8 November 2018 at 13:39, Richard Henderson <rth@twiddle.net> wrote:
> On 11/8/18 1:52 PM, Peter Maydell wrote:
>> The tcg-op.h header was missing the usual guard against multiple
>> inclusion; add it.
>>
>> (Spotted by lgtm.com's static analyzer.)
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> tcg/tcg-op.h | 5 +++++
>> 1 file changed, 5 insertions(+)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> FWIW, while I can queue this, I do not have any other outstanding tcg patches.
> So maybe just apply it to master directly?
OK, applied to master.
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-11-08 15:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-08 12:52 [Qemu-devel] [PATCH] tcg/tcg-op.h: Add multiple include guard Peter Maydell
2018-11-08 12:57 ` Marc-André Lureau
2018-11-08 13:08 ` Philippe Mathieu-Daudé
2018-11-08 13:17 ` Peter Maydell
2018-11-08 14:08 ` Philippe Mathieu-Daudé
2018-11-08 13:39 ` Richard Henderson
2018-11-08 15:53 ` Peter Maydell
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).