diff mbox series

[v2,4/6] linux-user/flatload.c: Use "" for include of QEMU header target_flat.h

Message ID 20200319193323.2038-5-peter.maydell@linaro.org
State Superseded
Headers show
Series Automation of Coverity Scan uploads (via Docker) | expand

Commit Message

Peter Maydell March 19, 2020, 7:33 p.m. UTC
The target_flat.h file is a QEMU header, so we should include it using
quotes, not angle brackets.

Coverity otherwise is unable to find the header:

"../linux-user/flatload.c", line 40: error #1712: cannot open source file
          "target_flat.h"
  #include <target_flat.h>
                          ^

because the relevant directory is only on the -iquote path, not the -I path.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
I don't know why Coverity in particular has trouble here but
real compilers don't. Still, the "" is the right thing.
---
 linux-user/flatload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.1

Comments

Richard Henderson March 20, 2020, 5:19 p.m. UTC | #1
On 3/19/20 12:33 PM, Peter Maydell wrote:
> The target_flat.h file is a QEMU header, so we should include it using

> quotes, not angle brackets.

> 

> Coverity otherwise is unable to find the header:

> 

> "../linux-user/flatload.c", line 40: error #1712: cannot open source file

>           "target_flat.h"

>   #include <target_flat.h>

>                           ^

> 

> because the relevant directory is only on the -iquote path, not the -I path.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

> I don't know why Coverity in particular has trouble here but

> real compilers don't. Still, the "" is the right thing.

> ---

>  linux-user/flatload.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
Philippe Mathieu-Daudé March 22, 2020, 10:41 a.m. UTC | #2
On 3/19/20 8:33 PM, Peter Maydell wrote:
> The target_flat.h file is a QEMU header, so we should include it using

> quotes, not angle brackets.

> 

> Coverity otherwise is unable to find the header:

> 

> "../linux-user/flatload.c", line 40: error #1712: cannot open source file

>            "target_flat.h"

>    #include <target_flat.h>

>                            ^

> 

> because the relevant directory is only on the -iquote path, not the -I path.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

> I don't know why Coverity in particular has trouble here but

> real compilers don't. Still, the "" is the right thing.

> ---

>   linux-user/flatload.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/linux-user/flatload.c b/linux-user/flatload.c

> index 0122ab3afe6..66901f39cc5 100644

> --- a/linux-user/flatload.c

> +++ b/linux-user/flatload.c

> @@ -37,7 +37,7 @@

>   

>   #include "qemu.h"

>   #include "flat.h"

> -#include <target_flat.h>

> +#include "target_flat.h"

>   

>   //#define DEBUG

>   

> 


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/linux-user/flatload.c b/linux-user/flatload.c
index 0122ab3afe6..66901f39cc5 100644
--- a/linux-user/flatload.c
+++ b/linux-user/flatload.c
@@ -37,7 +37,7 @@ 
 
 #include "qemu.h"
 #include "flat.h"
-#include <target_flat.h>
+#include "target_flat.h"
 
 //#define DEBUG