[virt-tools-list] [PATCH 09/11] include <string.h> for decl of strcmp, in test programs

Jim Meyering jim at meyering.net
Fri Jan 29 14:58:50 UTC 2010


From: Jim Meyering <meyering at redhat.com>

---
 test/test-filter.c                |    1 +
 test/test-get_devices.c           |    1 +
 test/test-get_os.c                |    1 +
 test/test-manipulate_devices.c    |    3 ++-
 test/test-manipulate_hypervisor.c |    1 +
 test/test-manipulate_library.c    |    1 +
 test/test-manipulate_os.c         |    5 +++--
 test/test-set_hypervisor.c        |    1 +
 8 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/test/test-filter.c b/test/test-filter.c
index 3884fe3..dc3eaee 100644
--- a/test/test-filter.c
+++ b/test/test-filter.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
diff --git a/test/test-get_devices.c b/test/test-get_devices.c
index 807004f..ac00ee6 100644
--- a/test/test-get_devices.c
+++ b/test/test-get_devices.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
diff --git a/test/test-get_os.c b/test/test-get_os.c
index fc1a011..83d6acd 100644
--- a/test/test-get_os.c
+++ b/test/test-get_os.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
diff --git a/test/test-manipulate_devices.c b/test/test-manipulate_devices.c
index 12d59c4..3b19b0c 100644
--- a/test/test-manipulate_devices.c
+++ b/test/test-manipulate_devices.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
@@ -132,4 +133,4 @@ int main(int argc, char** argv)

     printf("test-manipulate_devices succeeded.\n");
     return 0;
-}
\ No newline at end of file
+}
diff --git a/test/test-manipulate_hypervisor.c b/test/test-manipulate_hypervisor.c
index 7869b00..23c11aa 100644
--- a/test/test-manipulate_hypervisor.c
+++ b/test/test-manipulate_hypervisor.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
diff --git a/test/test-manipulate_library.c b/test/test-manipulate_library.c
index 3e78b23..e588aba 100644
--- a/test/test-manipulate_library.c
+++ b/test/test-manipulate_library.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
diff --git a/test/test-manipulate_os.c b/test/test-manipulate_os.c
index 7678a75..5bcbc69 100644
--- a/test/test-manipulate_os.c
+++ b/test/test-manipulate_os.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
@@ -99,7 +100,7 @@ int main(int argc, char** argv)
     assert ( len == 3 );
     assert ( unique_values != NULL );
     for (i = 0; i < len; i++) {
-        assert ( 
+        assert (
             strcmp("Fedora Project", unique_values[i]) == 0 ||
             strcmp("OpenSuse Project", unique_values[i]) == 0 ||
             strcmp("Red Hat", unique_values[i]) == 0
@@ -164,4 +165,4 @@ int main(int argc, char** argv)

     printf("test-manipulate_os succeeded.\n");
     return 0;
-}
\ No newline at end of file
+}
diff --git a/test/test-set_hypervisor.c b/test/test-set_hypervisor.c
index a831413..d7fec9a 100644
--- a/test/test-set_hypervisor.c
+++ b/test/test-set_hypervisor.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <assert.h>
 #include <libosinfo.h>
-- 
1.7.0.rc0.187.g226c




More information about the virt-tools-list mailing list