aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbitz <orbitz@gmail.com>2013-12-29 12:48:40 +0100
committerorbitz <orbitz@gmail.com>2013-12-29 12:48:40 +0100
commit1701700a02e338835822c1a6d5c61d35ef9cf4e7 (patch)
tree80a1574089d3a290694498574307f3fdc7345bb7
parent0c9de1b1b31ded62c0307055f7d8e0c2ff39955d (diff)
Clean up signed comparison warnings
-rw-r--r--kmer_counts_per_sequence.c2
-rw-r--r--kmer_utils.c6
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