208da7ba73e4a9a84a6427b41f8f456ae280ae9f
galt
  Tue Oct 17 17:56:51 2017 -0700
Fixing compile errors.

diff --git src/htslib/hts.c src/htslib/hts.c
index 2f8d9f5..1f14725 100644
--- src/htslib/hts.c
+++ src/htslib/hts.c
@@ -1977,31 +1977,31 @@
         uint8_t *buf;
         int l;
         const char *p;
         for (p = fn + strlen(fn) - 1; p >= fn; --p)
             if (*p == '/') break;
         ++p; // p now points to the local file name
         // Attempt to open local file first
         if ((fp = fopen((char*)p, "rb")) != 0)
         {
             fclose(fp);
             return (char*)p;
         }
 #endif
         // Attempt to open remote file. Stay quiet on failure, it is OK to fail when trying first .csi then .tbi index.
         if ((fp_remote = hopen(fn, "r")) == 0) return 0;
-hclose(fp_remote);
+if (hclose(fp_remote) != 0) fprintf(stderr, "[E::%s] fail to close remote file '%s'\n", __func__, fn);
 return fn;
 #ifdef NOTNOW
         if ((fp = fopen(p, "w")) == 0) {
             if (hts_verbose >= 1) fprintf(stderr, "[E::%s] fail to create file '%s' in the working directory\n", __func__, p);
             hclose_abruptly(fp_remote);
             return 0;
         }
         if (hts_verbose >= 3) fprintf(stderr, "[M::%s] downloading file '%s' to local directory\n", __func__, fn);
         buf = (uint8_t*)calloc(buf_size, 1);
         while ((l = hread(fp_remote, buf, buf_size)) > 0) fwrite(buf, 1, l, fp);
         free(buf);
         fclose(fp);
         if (hclose(fp_remote) != 0) fprintf(stderr, "[E::%s] fail to close remote file '%s'\n", __func__, fn);
         return (char*)p;
 #endif