diff options
author | Richard Jones <rjones@redhat.com> | 2012-03-29 13:33:26 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-03-30 15:39:30 +0100 |
commit | b3db09aadf1ce9f4660ccd6a2646d9ed2f9d1222 (patch) | |
tree | f0152fa3520bfeeb0dcf001526f0759aea07f46a | |
parent | cc8e3397be4d4664cdc8e381ff2dc49a9ae63717 (diff) | |
download | libguestfs-b3db09aadf1ce9f4660ccd6a2646d9ed2f9d1222.tar.gz libguestfs-b3db09aadf1ce9f4660ccd6a2646d9ed2f9d1222.tar.xz libguestfs-b3db09aadf1ce9f4660ccd6a2646d9ed2f9d1222.zip |
test: Thread function is a candidate for attribute noreturn.
The start_test_thread function never returns, it is always
cancelled by the main thread.
(cherry picked from commit b9cb387a109f4d09cdef84a62194201e78f97cb7)
-rw-r--r-- | tests/c-api/test-user-cancel.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/c-api/test-user-cancel.c b/tests/c-api/test-user-cancel.c index 4908f953..25faf619 100644 --- a/tests/c-api/test-user-cancel.c +++ b/tests/c-api/test-user-cancel.c @@ -50,7 +50,7 @@ static const char *filename = "test.img"; static const off_t filesize = 1024*1024*1024; static void remove_test_img (void); -static void *start_test_thread (void *); +static void *start_test_thread (void *) __attribute__((noreturn)); static off_t random_cancel_posn (void); struct test_thread_data { @@ -327,8 +327,6 @@ start_test_thread (void *datav) while (1) pause (); } - - return NULL; } static double random_gauss (double mu, double sd); |