diff mbox series

[02/10] hw/remote: Add missing include

Message ID 20220203193803.45671-3-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series exec: Remove 'qemu/log.h' from 'exec-all.h' | expand

Commit Message

Philippe Mathieu-Daudé Feb. 3, 2022, 7:37 p.m. UTC
Currently "qemu/error-report.h" is implicitly included, however
if headers in include/ get refactored, we get:

  hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’:
  hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of function ‘error_report’; did you mean ‘error_report_err’? [-Werror=implicit-function-declaration]
    183 |         error_report("Number of fds is more than %d", REMOTE_MAX_FDS);
        |         ^~~~~~~~~~~~
        |         error_report_err

Add the missing "qemu/error-report.h" header to avoid that.

Reviewed-by: Jagannathan Raman <jag.raman@oracle.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/remote/proxy-memory-listener.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Huth Feb. 4, 2022, 3:16 p.m. UTC | #1
On 03/02/2022 20.37, Philippe Mathieu-Daudé wrote:
> Currently "qemu/error-report.h" is implicitly included, however
> if headers in include/ get refactored, we get:
> 
>    hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’:
>    hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of function ‘error_report’; did you mean ‘error_report_err’? [-Werror=implicit-function-declaration]
>      183 |         error_report("Number of fds is more than %d", REMOTE_MAX_FDS);
>          |         ^~~~~~~~~~~~
>          |         error_report_err
> 
> Add the missing "qemu/error-report.h" header to avoid that.
> 
> Reviewed-by: Jagannathan Raman <jag.raman@oracle.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/remote/proxy-memory-listener.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
> index 882c9b4854..0e893f3189 100644
> --- a/hw/remote/proxy-memory-listener.c
> +++ b/hw/remote/proxy-memory-listener.c
> @@ -16,6 +16,7 @@
>   #include "exec/cpu-common.h"
>   #include "exec/ram_addr.h"
>   #include "qapi/error.h"
> +#include "qemu/error-report.h"
>   #include "hw/remote/mpqemu-link.h"
>   #include "hw/remote/proxy-memory-listener.h"
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>
Richard Henderson Feb. 5, 2022, 11:48 p.m. UTC | #2
On 2/4/22 06:37, Philippe Mathieu-Daudé wrote:
> Currently "qemu/error-report.h" is implicitly included, however
> if headers in include/ get refactored, we get:
> 
>    hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’:
>    hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of function ‘error_report’; did you mean ‘error_report_err’? [-Werror=implicit-function-declaration]
>      183 |         error_report("Number of fds is more than %d", REMOTE_MAX_FDS);
>          |         ^~~~~~~~~~~~
>          |         error_report_err
> 
> Add the missing "qemu/error-report.h" header to avoid that.
> 
> Reviewed-by: Jagannathan Raman<jag.raman@oracle.com>
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   hw/remote/proxy-memory-listener.c | 1 +
>   1 file changed, 1 insertion(+)

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

r~
diff mbox series

Patch

diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
index 882c9b4854..0e893f3189 100644
--- a/hw/remote/proxy-memory-listener.c
+++ b/hw/remote/proxy-memory-listener.c
@@ -16,6 +16,7 @@ 
 #include "exec/cpu-common.h"
 #include "exec/ram_addr.h"
 #include "qapi/error.h"
+#include "qemu/error-report.h"
 #include "hw/remote/mpqemu-link.h"
 #include "hw/remote/proxy-memory-listener.h"