shithub: choc

Download patch

ref: 9e71dbbd21c72ef8f5a1478efa1596fe1b353307
parent: 40b2fed7e5554b25488f296f163d6c61a6ce9dce
author: Fabian Greffrath <[email protected]>
date: Tue Nov 22 06:19:07 EST 2016

hexen/sv_save.c: fix variable 'write_count' set but not used

--- a/src/hexen/sv_save.c
+++ b/src/hexen/sv_save.c
@@ -3257,7 +3257,7 @@
     byte *buffer;
     int file_length, file_remaining;
     FILE *read_handle, *write_handle;
-    int buf_count, read_count, write_count;
+    int buf_count, read_count;
 
     read_handle = fopen(source_name, "rb");
     if (read_handle == NULL)
@@ -3299,7 +3299,7 @@
         {
             I_Error ("Couldn't read file %s", source_name);
         }
-        write_count = fwrite(buffer, 1, buf_count, write_handle);
+
         if (read_count < buf_count)
         {
             I_Error ("Couldn't read file %s", dest_name);