From 1701700a02e338835822c1a6d5c61d35ef9cf4e7 Mon Sep 17 00:00:00 2001 From: orbitz Date: Sun, 29 Dec 2013 12:48:40 +0100 Subject: Clean up signed comparison warnings --- kmer_counts_per_sequence.c | 2 +- kmer_utils.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kmer_counts_per_sequence.c b/kmer_counts_per_sequence.c index 66accc8..6557d5d 100644 --- a/kmer_counts_per_sequence.c +++ b/kmer_counts_per_sequence.c @@ -24,7 +24,7 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); } - unsigned long kmer = atoi(argv[2]); + long kmer = atoi(argv[2]); if(kmer == 0) { fprintf(stderr, "Error: invalid kmer.\n"); exit(EXIT_FAILURE); diff --git a/kmer_utils.c b/kmer_utils.c index 3fd9e4c..ce0aa81 100644 --- a/kmer_utils.c +++ b/kmer_utils.c @@ -6,7 +6,7 @@ #include "kmer_total_count.h" -static const unsigned char alpha[256] = +const unsigned char alpha[256] = {5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, @@ -118,8 +118,8 @@ unsigned long long *get_kmer_counts_from_file(FILE *fh, const unsigned int kmer) size_t len = 0; ssize_t read; - long long i = 0; - long long position = 0; + size_t i = 0; + size_t position = 0; // width is 4^kmer // there's a sneaky bitshift to avoid pow dependency -- cgit v1.2.3