public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: pru: fix include ordering with sim-main.h
@ 2021-01-09  8:04 Mike Frysinger
  2021-01-09 11:37 ` Andrew Burgess
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2021-01-09  8:04 UTC (permalink / raw)
  To: gdb-patches

Make sure config.h is included before C library headers otherwise the
later libiberty.h include gets confused about asprintf state leading
to warnings like:
common/sim-utils.c:330:9:
	warning: implicit declaration of function 'vasprintf';
	did you mean 'xvasprintf'? [-Wimplicit-function-declaration]
---
 sim/pru/sim-main.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sim/pru/sim-main.h b/sim/pru/sim-main.h
index 8233c20cefd7..966cacf5693d 100644
--- a/sim/pru/sim-main.h
+++ b/sim/pru/sim-main.h
@@ -19,6 +19,8 @@
 #ifndef PRU_SIM_MAIN
 #define PRU_SIM_MAIN
 
+#include "config.h"
+
 #include <stdint.h>
 #include <stddef.h>
 #include "pru.h"
-- 
2.28.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sim: pru: fix include ordering with sim-main.h
  2021-01-09  8:04 [PATCH] sim: pru: fix include ordering with sim-main.h Mike Frysinger
@ 2021-01-09 11:37 ` Andrew Burgess
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2021-01-09 11:37 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches

* Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> [2021-01-09 03:04:01 -0500]:

> Make sure config.h is included before C library headers otherwise the
> later libiberty.h include gets confused about asprintf state leading
> to warnings like:
> common/sim-utils.c:330:9:
> 	warning: implicit declaration of function 'vasprintf';
> 	did you mean 'xvasprintf'? [-Wimplicit-function-declaration]
> ---
>  sim/pru/sim-main.h | 2 ++
>  1 file changed, 2 insertions(+)

LGTM, but will need a ChangeLog entry.

Thanks,
Andrew


> 
> diff --git a/sim/pru/sim-main.h b/sim/pru/sim-main.h
> index 8233c20cefd7..966cacf5693d 100644
> --- a/sim/pru/sim-main.h
> +++ b/sim/pru/sim-main.h
> @@ -19,6 +19,8 @@
>  #ifndef PRU_SIM_MAIN
>  #define PRU_SIM_MAIN
>  
> +#include "config.h"
> +
>  #include <stdint.h>
>  #include <stddef.h>
>  #include "pru.h"
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-09 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09  8:04 [PATCH] sim: pru: fix include ordering with sim-main.h Mike Frysinger
2021-01-09 11:37 ` Andrew Burgess

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 read-only IMAP folder(s) and NNTP newsgroup(s).