From: Catalin Patulea <catalinp@google.com>
To: qemu-devel@nongnu.org
Cc: Catalin Patulea <catalinp@google.com>
Subject: [Qemu-devel] [PATCH] tests/tcg: fix a few warnings
Date: Mon, 22 Oct 2012 19:18:35 -0400 [thread overview]
Message-ID: <1350947915-8213-1-git-send-email-catalinp@google.com> (raw)
Signed-off-by: Catalin Patulea <catalinp@google.com>
---
This leaves a few of these:
warning: ignoring return value of 'write', declared with attribute warn_unused_result
How interesting is it to fix these? (Perhaps by asserting that the full write completed?)
tests/tcg/hello-i386.c | 3 ++-
tests/tcg/test-i386.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/tcg/hello-i386.c b/tests/tcg/hello-i386.c
index 86afc34..fa00380 100644
--- a/tests/tcg/hello-i386.c
+++ b/tests/tcg/hello-i386.c
@@ -1,6 +1,6 @@
#include <asm/unistd.h>
-static inline volatile void exit(int status)
+static inline void exit(int status)
{
int __res;
__asm__ volatile ("movl %%ecx,%%ebx\n"\
@@ -17,6 +17,7 @@ static inline int write(int fd, const char * buf, int len)
"popl %%ebx\n"\
: "=a" (status) \
: "0" (__NR_write),"S" ((long)(fd)),"c" ((long)(buf)),"d" ((long)(len)));
+ return status;
}
void _start(void)
diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c
index 64d929e..40392ac 100644
--- a/tests/tcg/test-i386.c
+++ b/tests/tcg/test-i386.c
@@ -785,7 +785,7 @@ void fpu_clear_exceptions(void)
long double fpregs[8];
} float_env32;
- asm volatile ("fnstenv %0\n" : : "m" (float_env32));
+ asm volatile ("fnstenv %0\n" : "=m" (float_env32));
float_env32.fpus &= ~0x7f;
asm volatile ("fldenv %0\n" : : "m" (float_env32));
}
--
1.7.7.3
next reply other threads:[~2012-10-22 23:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 23:18 Catalin Patulea [this message]
2012-10-27 16:53 ` [Qemu-devel] [PATCH] tests/tcg: fix a few warnings Blue Swirl
2012-10-29 7:06 ` [Qemu-devel] [PATCH] tests/tcg: fix unused result warnings Catalin Patulea
2012-10-29 8:38 ` Peter Maydell
2012-10-29 18:01 ` [Qemu-devel] [PATCHv2] " Catalin Patulea
2012-10-30 21:08 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350947915-8213-1-git-send-email-catalinp@google.com \
--to=catalinp@google.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).