diff mbox series

[v1,12/24] tests/tcg/i386: Build fix for hello-i386

Message ID 20180410193919.28026-13-alex.bennee@linaro.org
State Superseded
Headers show
Series fix building of tests/tcg | expand

Commit Message

Alex Bennée April 10, 2018, 7:39 p.m. UTC
From: Fam Zheng <famz@redhat.com>


We have -Werror=missing-prototype, add a dummy prototype to avoid that
warning.

Signed-off-by: Fam Zheng <famz@redhat.com>

---
 tests/tcg/i386/hello-i386.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.16.2

Comments

Thomas Huth April 11, 2018, 10:30 a.m. UTC | #1
On 10.04.2018 21:39, Alex Bennée wrote:
> From: Fam Zheng <famz@redhat.com>

> 

> We have -Werror=missing-prototype, add a dummy prototype to avoid that

> warning.

> 

> Signed-off-by: Fam Zheng <famz@redhat.com>

> ---

>  tests/tcg/i386/hello-i386.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c

> index fa00380de2..cfeb24b2f5 100644

> --- a/tests/tcg/i386/hello-i386.c

> +++ b/tests/tcg/i386/hello-i386.c

> @@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len)

>    return status;

>  }

>  

> +void _start(void);

>  void _start(void)

>  {

>      write(1, "Hello World\n", 12);

> 


Reviewed-by: Thomas Huth <thuth@redhat.com>
Philippe Mathieu-Daudé April 16, 2018, 12:11 a.m. UTC | #2
Hi Fam, Alex,

On 04/10/2018 04:39 PM, Alex Bennée wrote:
> From: Fam Zheng <famz@redhat.com>

> 

> We have -Werror=missing-prototype, add a dummy prototype to avoid that

> warning.

> 

> Signed-off-by: Fam Zheng <famz@redhat.com>

> ---

>  tests/tcg/i386/hello-i386.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c

> index fa00380de2..cfeb24b2f5 100644

> --- a/tests/tcg/i386/hello-i386.c

> +++ b/tests/tcg/i386/hello-i386.c

> @@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len)

>    return status;

>  }

>  

> +void _start(void);


What about adding that in a common base file include by all tcg tests?
Such tests/tcg/include/tcg-common.h or better name...

>  void _start(void)

>  {

>      write(1, "Hello World\n", 12);

>
Alex Bennée April 16, 2018, 8:57 a.m. UTC | #3
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Hi Fam, Alex,

>

> On 04/10/2018 04:39 PM, Alex Bennée wrote:

>> From: Fam Zheng <famz@redhat.com>

>> 

>> We have -Werror=missing-prototype, add a dummy prototype to avoid that

>> warning.

>> 

>> Signed-off-by: Fam Zheng <famz@redhat.com>

>> ---

>>  tests/tcg/i386/hello-i386.c | 1 +

>>  1 file changed, 1 insertion(+)

>> 

>> diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c

>> index fa00380de2..cfeb24b2f5 100644

>> --- a/tests/tcg/i386/hello-i386.c

>> +++ b/tests/tcg/i386/hello-i386.c

>> @@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len)

>>    return status;

>>  }

>>  

>> +void _start(void);

>

> What about adding that in a common base file include by all tcg tests?

> Such tests/tcg/include/tcg-common.h or better name...


For this I don't think it makes much sense. Not all linux-user tests are
quite so bare bones...

>

>>  void _start(void)

>>  {

>>      write(1, "Hello World\n", 12);

>> 



-- 
Alex Bennée
diff mbox series

Patch

diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c
index fa00380de2..cfeb24b2f5 100644
--- a/tests/tcg/i386/hello-i386.c
+++ b/tests/tcg/i386/hello-i386.c
@@ -20,6 +20,7 @@  static inline int write(int fd, const char * buf, int len)
   return status;
 }
 
+void _start(void);
 void _start(void)
 {
     write(1, "Hello World\n", 12);