[virt-tools-list] [PATCH 07/11] avoid FP unused "osname" warning

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


From: Jim Meyering <meyering at redhat.com>

* test/sample.c (main): Print "osname", so that variable
does not appear to be unused.
---
 test/sample.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/sample.c b/test/sample.c
index f6b1133..11ed2a3 100644
--- a/test/sample.c
+++ b/test/sample.c
@@ -119,6 +119,7 @@ int main(int argc, char** argv)
         printf("Couldn't get property!\n");
         exit(1);
     }
+    printf ("osname: %s\n", osname);

     osi_device_list_t audio_devices = osi_os_devices(os, "audio", NULL, &err);
     num = osi_devices_list_length(audio_devices);
@@ -128,7 +129,7 @@ int main(int argc, char** argv)
     for (j = 0; j < num; j++) {
       osi_device_t device = osi_get_device_by_index(audio_devices, j, &err);
       printf("Audio device for %s:\n", os_id);
-      printf("\tBus Type: %s Vendor: %s Product: %s\n", 
+      printf("\tBus Type: %s Vendor: %s Product: %s\n",
                  osi_get_device_property_value(device, "bus-type", &err),
                  osi_get_device_property_value(device, "vendor", &err),
                  osi_get_device_property_value(device, "product", &err));
@@ -164,4 +165,4 @@ int main(int argc, char** argv)

   printf("Done.\n");
   return 0;
-}
\ No newline at end of file
+}
-- 
1.7.0.rc0.187.g226c




More information about the virt-tools-list mailing list