aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2015-01-10 01:18:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 12:17:57 -0500
commit77ce247a8dbc587564dbfcb16fc6d09f6f85b31b (patch)
tree964120896252a110c17b0b92138d92c2a8203ebf /tools
parent79af73079d753b2d04e46f7445716d3b5f914dbd (diff)
Tools: hv: remove unused bytes_written from kvp_update_file()
fwrite() does not actually return the number of bytes written and this value is being ignored anyway and ferror() is being called to check for an error. As we assign to this variable and never use it we get the following compile-time warning: hv_kvp_daemon.c:149:9: warning: variable .bytes_written. set but not used [-Wunused-but-set-variable] Remove bytes_written completely. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/hv/hv_kvp_daemon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 4b3ee3521bde..fe790090f328 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -147,7 +147,6 @@ static void kvp_release_lock(int pool)
147static void kvp_update_file(int pool) 147static void kvp_update_file(int pool)
148{ 148{
149 FILE *filep; 149 FILE *filep;
150 size_t bytes_written;
151 150
152 /* 151 /*
153 * We are going to write our in-memory registry out to 152 * We are going to write our in-memory registry out to
@@ -163,8 +162,7 @@ static void kvp_update_file(int pool)
163 exit(EXIT_FAILURE); 162 exit(EXIT_FAILURE);
164 } 163 }
165 164
166 bytes_written = fwrite(kvp_file_info[pool].records, 165 fwrite(kvp_file_info[pool].records, sizeof(struct kvp_record),
167 sizeof(struct kvp_record),
168 kvp_file_info[pool].num_records, filep); 166 kvp_file_info[pool].num_records, filep);
169 167
170 if (ferror(filep) || fclose(filep)) { 168 if (ferror(filep) || fclose(filep)) {