* [PATCH] configure: Fix for running with --enable-werror on macOS
@ 2020-07-16 5:56 Thomas Huth
2020-07-16 7:32 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2020-07-16 5:56 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Peter Maydell
The configure script currently refuses to succeed when run on macOS
with --enable-werror:
ERROR: configure test passed without -Werror but failed with -Werror.
The information in config.log indicates:
config-temp/qemu-conf.c:3:55: error: control reaches end of non-void
function [-Werror,-Wreturn-type]
static void *f(void *p) { pthread_setname_np("QEMU"); }
^
And indeed, the return statement is missing here.
Fixes: 479a57475e ("util: Implement debug-threads for macOS")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
Note: There is another issue with --enable-werror on macOS, with the
atomic64, which I haven't quite figured out yet, so compiling
with --enable-werror is still not working there.
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index b751c853f5..e93836aaae 100755
--- a/configure
+++ b/configure
@@ -4198,7 +4198,7 @@ pthread_setname_np_wo_tid=no
cat > $TMPC << EOF
#include <pthread.h>
-static void *f(void *p) { pthread_setname_np("QEMU"); }
+static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
int main(void)
{
pthread_t thread;
--
2.18.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] configure: Fix for running with --enable-werror on macOS
2020-07-16 5:56 [PATCH] configure: Fix for running with --enable-werror on macOS Thomas Huth
@ 2020-07-16 7:32 ` Philippe Mathieu-Daudé
2020-07-16 7:33 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-16 7:32 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: qemu-trivial, Peter Maydell
On 7/16/20 7:56 AM, Thomas Huth wrote:
> The configure script currently refuses to succeed when run on macOS
> with --enable-werror:
>
> ERROR: configure test passed without -Werror but failed with -Werror.
>
> The information in config.log indicates:
>
> config-temp/qemu-conf.c:3:55: error: control reaches end of non-void
> function [-Werror,-Wreturn-type]
> static void *f(void *p) { pthread_setname_np("QEMU"); }
> ^
> And indeed, the return statement is missing here.
I have a similar commit dated "2019-07-13 17:13:51" that fixes that too,
because I had problem with a CI (cirrus?). I remember there was a
discussion about it, as I can't find on the list, I suppose it was
discussed on IRC.
I don't remember the outcome, it was negative or the patch was
incomplete. I'm happy if it get fixed, so:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> Fixes: 479a57475e ("util: Implement debug-threads for macOS")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> Note: There is another issue with --enable-werror on macOS, with the
> atomic64, which I haven't quite figured out yet, so compiling
> with --enable-werror is still not working there.
>
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index b751c853f5..e93836aaae 100755
> --- a/configure
> +++ b/configure
> @@ -4198,7 +4198,7 @@ pthread_setname_np_wo_tid=no
> cat > $TMPC << EOF
> #include <pthread.h>
>
> -static void *f(void *p) { pthread_setname_np("QEMU"); }
> +static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
> int main(void)
> {
> pthread_t thread;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] configure: Fix for running with --enable-werror on macOS
2020-07-16 7:32 ` Philippe Mathieu-Daudé
@ 2020-07-16 7:33 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-16 7:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: QEMU Trivial, Peter Maydell, Thomas Huth, QEMU Developers
On Thu, Jul 16, 2020 at 9:32 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 7/16/20 7:56 AM, Thomas Huth wrote:
> > The configure script currently refuses to succeed when run on macOS
> > with --enable-werror:
> >
> > ERROR: configure test passed without -Werror but failed with -Werror.
> >
> > The information in config.log indicates:
> >
> > config-temp/qemu-conf.c:3:55: error: control reaches end of non-void
> > function [-Werror,-Wreturn-type]
> > static void *f(void *p) { pthread_setname_np("QEMU"); }
> > ^
> > And indeed, the return statement is missing here.
>
> I have a similar commit dated "2019-07-13 17:13:51" that fixes that too,
> because I had problem with a CI (cirrus?). I remember there was a
> discussion about it, as I can't find on the list, I suppose it was
> discussed on IRC.
> I don't remember the outcome, it was negative or the patch was
> incomplete. I'm happy if it get fixed, so:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Oops the other one:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> >
> > Fixes: 479a57475e ("util: Implement debug-threads for macOS")
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > ---
> > Note: There is another issue with --enable-werror on macOS, with the
> > atomic64, which I haven't quite figured out yet, so compiling
> > with --enable-werror is still not working there.
> >
> > configure | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index b751c853f5..e93836aaae 100755
> > --- a/configure
> > +++ b/configure
> > @@ -4198,7 +4198,7 @@ pthread_setname_np_wo_tid=no
> > cat > $TMPC << EOF
> > #include <pthread.h>
> >
> > -static void *f(void *p) { pthread_setname_np("QEMU"); }
> > +static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
> > int main(void)
> > {
> > pthread_t thread;
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-16 7:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 5:56 [PATCH] configure: Fix for running with --enable-werror on macOS Thomas Huth
2020-07-16 7:32 ` Philippe Mathieu-Daudé
2020-07-16 7:33 ` Philippe Mathieu-Daudé
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).