diff --git a/tests/c-api/test-just-header-cxx.cpp b/tests/c-api/test-just-header-cxx.cpp index 611d2fbb8..876d557b5 100644 --- a/tests/c-api/test-just-header-cxx.cpp +++ b/tests/c-api/test-just-header-cxx.cpp @@ -30,6 +30,5 @@ int main (int argc, char *argv[]) { guestfs_h *g = guestfs_create (); - (void) g; /* trick shamelessly stolen from gnulib */ - return 0; + return g != NULL ? 0 : 1; } diff --git a/tests/c-api/test-just-header.c b/tests/c-api/test-just-header.c index 233577139..98c7ebd9a 100644 --- a/tests/c-api/test-just-header.c +++ b/tests/c-api/test-just-header.c @@ -26,6 +26,5 @@ int main (int argc, char *argv[]) { guestfs_h *g = guestfs_create (); - (void) g; /* trick shamelessly stolen from gnulib */ - return 0; + return g != NULL ? 0 : 1; }