Skip to content

Commit af87825

Browse files
committed
Replace u_int32_t by the more common uint32_t
The u_int32_t type comes from <sys/types.h>, which is often included as a byproduct of other headers on glibc platforms, but not on FreeBSD or Alpine Linux. Use <stdint.h>'s uint32_t instead, which is used elsewhere in bwa source code.
1 parent f123871 commit af87825

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

bwt_lite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bwtl_t *bwtl_seq2bwtl(int len, const uint8_t *seq)
4848
}
4949
{ // generate cnt_table
5050
for (i = 0; i != 256; ++i) {
51-
u_int32_t j, x = 0;
51+
uint32_t j, x = 0;
5252
for (j = 0; j != 4; ++j)
5353
x |= (((i&3) == j) + ((i>>2&3) == j) + ((i>>4&3) == j) + (i>>6 == j)) << (j<<3);
5454
b->cnt_table[i] = x;

bwtgap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static inline void gap_push(gap_stack_t *stack, int i, bwtint_t k, bwtint_t l, i
5858
q->stack = (gap_entry_t*)realloc(q->stack, sizeof(gap_entry_t) * q->m_entries);
5959
}
6060
p = q->stack + q->n_entries;
61-
p->info = (u_int32_t)score<<21 | i; p->k = k; p->l = l;
61+
p->info = (uint32_t)score<<21 | i; p->k = k; p->l = l;
6262
p->n_mm = n_mm; p->n_gapo = n_gapo; p->n_gape = n_gape;
6363
p->n_ins = n_ins; p->n_del = n_del;
6464
p->state = state;

bwtgap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#include "bwtaln.h"
66

77
typedef struct { // recursion stack
8-
u_int32_t info; // score<<21 | i
9-
u_int32_t n_mm:8, n_gapo:8, n_gape:8, state:2, n_seed_mm:6;
10-
u_int32_t n_ins:16, n_del:16;
8+
uint32_t info; // score<<21 | i
9+
uint32_t n_mm:8, n_gapo:8, n_gape:8, state:2, n_seed_mm:6;
10+
uint32_t n_ins:16, n_del:16;
1111
int last_diff_pos;
1212
bwtint_t k, l; // (k,l) is the SA region of [i,n-1]
1313
} gap_entry_t;

bwtindex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ bwt_t *bwt_pac2bwt(const char *fn_pac, int use_is)
119119
}
120120
rope_destroy(r);
121121
}
122-
bwt->bwt = (u_int32_t*)calloc(bwt->bwt_size, 4);
122+
bwt->bwt = (uint32_t*)calloc(bwt->bwt_size, 4);
123123
for (i = 0; i < bwt->seq_len; ++i)
124124
bwt->bwt[i>>4] |= buf[i] << ((15 - (i&15)) << 1);
125125
free(buf);

0 commit comments

Comments
 (0)