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

[Xen-devel] [PATCH 15 of 18] tools/blktap2: remove static string table from header file



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1333397578 -7200
# Node ID 55f205a0d2d6831f0e0280bd19d0ade22ebd9fe3
# Parent  3d15aa971865cf18dac45cb70b53b5380604cc8d
tools/blktap2: remove static string table from header file

-O2 -Wall -Werror triggers these warnings:

../../include/vhd.h:109: warning: 'HD_TYPE_STR' defined but not used

Since its used only in one place, move it to the .c file.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

diff -r 3d15aa971865 -r 55f205a0d2d6 tools/blktap2/include/vhd.h
--- a/tools/blktap2/include/vhd.h
+++ b/tools/blktap2/include/vhd.h
@@ -105,17 +105,6 @@ static const char HD_COOKIE[9]  =  "cone
 #define HD_TYPE_DYNAMIC    3  /* dynamic disk */
 #define HD_TYPE_DIFF       4  /* differencing disk */
 
-/* String table for hd.type */
-static const char *HD_TYPE_STR[7] = {
-        "None",                    /* 0 */
-        "Reserved (deprecated)",   /* 1 */
-        "Fixed hard disk",         /* 2 */
-        "Dynamic hard disk",       /* 3 */
-        "Differencing hard disk",  /* 4 */
-        "Reserved (deprecated)",   /* 5 */
-        "Reserved (deprecated)"    /* 6 */
-};
-
 #define HD_TYPE_MAX 6
 
 struct prt_loc {
diff -r 3d15aa971865 -r 55f205a0d2d6 tools/blktap2/vhd/lib/vhd-util-read.c
--- a/tools/blktap2/vhd/lib/vhd-util-read.c
+++ b/tools/blktap2/vhd/lib/vhd-util-read.c
@@ -34,6 +34,17 @@
 #include "libvhd.h"
 #include "vhd-util.h"
 
+/* String table for hd.type */
+static const char *HD_TYPE_STR[7] = {
+        "None",                    /* 0 */
+        "Reserved (deprecated)",   /* 1 */
+        "Fixed hard disk",         /* 2 */
+        "Dynamic hard disk",       /* 3 */
+        "Differencing hard disk",  /* 4 */
+        "Reserved (deprecated)",   /* 5 */
+        "Reserved (deprecated)"    /* 6 */
+};
+
 #define nsize     15
 static char nbuf[nsize];
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.