From fb6333f438df0d5d8be66506f606073b3c660eaa Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 10 Oct 2011 14:12:46 -0400 Subject: [PATCH] fixed a compiling error using g++ (not gcc) --- kseq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kseq.h b/kseq.h index 0bbc7dc..8b2bd3b 100644 --- a/kseq.h +++ b/kseq.h @@ -51,7 +51,7 @@ { \ kstream_t *ks = (kstream_t*)calloc(1, sizeof(kstream_t)); \ ks->f = f; \ - ks->buf = malloc(__bufsize); \ + ks->buf = (unsigned char*)malloc(__bufsize); \ return ks; \ } \ static inline void ks_destroy(kstream_t *ks) \ @@ -113,7 +113,7 @@ typedef struct __kstring_t { for (i = ks->begin; i < ks->end; ++i) \ if (isspace(ks->buf[i]) && ks->buf[i] != ' ') break; \ } else i = 0; /* never come to here! */ \ - if (str->m - str->l < i - ks->begin + 1) { \ + if (str->m - str->l < (size_t)i - ks->begin + 1) { \ str->m = str->l + (i - ks->begin) + 1; \ kroundup32(str->m); \ str->s = (char*)realloc(str->s, str->m); \ -- 2.47.3