[kvm-unit-tests PATCH] lib/s390x/io: Make sure that exit() is not returning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since commit 96d79976f779589 kvm-unit-tests can not be compiled on
s390x anymore. The compiler complains:

lib/s390x/io.c: In function ‘exit’:
lib/s390x/io.c:57:1: error: ‘noreturn’ function does return [-Werror]

Let's make sure that the function can really not return anymore
(i.e. also do not return anymore in case SIGP is broken for example).

Fixes: 96d79976f779589bbdbb24474de8fd214b179d7e
Reported-by: Lukáš Doktor <ldoktor@xxxxxxxxxx>
Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
---
 lib/s390x/io.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/s390x/io.c b/lib/s390x/io.c
index 17d5fc7..7bca637 100644
--- a/lib/s390x/io.c
+++ b/lib/s390x/io.c
@@ -51,5 +51,7 @@ void setup(void)
 void exit(int code)
 {
 	printf("\nEXIT: STATUS=%d\n", ((code) << 1) | 1);
-	sigp_stop();
+	while (1) {
+		sigp_stop();
+	}
 }
-- 
1.8.3.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux