Skip to content

Commit

Permalink
Fix old-style declaration warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
daviesrob committed Aug 29, 2024
1 parent 04e58e7 commit 835bbac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ rocky_task:
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
HTSDIR: ./hidden-htslib
CFLAGS: -O2 -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-error=old-style-declaration -Wno-empty-body
CFLAGS: -O2 -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-empty-body

# NB: we could consider building a docker image with these
# preinstalled and specifying that instead, to speed up testing.
Expand Down
4 changes: 2 additions & 2 deletions bam2depth.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ hts_pos_t qlen_used(bam1_t *b) {
// unroll it. By adding HTS_OPT3 we can force a better level of optimization.
// On an Illumina BAM with gcc11 -O2, with HTS_OPT3 is 9% quicker for the
// entire process (ie decompress, iterator, aggregate & report)
static void inline HTS_OPT3 incr_hist(int *hist, int oplen) {
static inline void HTS_OPT3 incr_hist(int *hist, int oplen) {
const int N = 16;
int k;
for (k = 0; k < (oplen & ~(N-1)); k+=N) {
Expand All @@ -173,7 +173,7 @@ static void inline HTS_OPT3 incr_hist(int *hist, int oplen) {
hist[k]++;
}

static void inline HTS_OPT3
static inline void HTS_OPT3
incr_hist_qual(int *hist, uint8_t *qual, int min_qual, int oplen) {
if (!min_qual) {
incr_hist(hist, oplen);
Expand Down
6 changes: 3 additions & 3 deletions test/split/test_expand_format_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ int main(int argc, char**argv)
{
// test state
TestState state = { NULL, KS_INITIALIZE, 0, 0, 0, 0};
const static htsFormat sam_fmt = { sequence_data, sam };
const static htsFormat bam_fmt = { sequence_data, bam };
const static htsFormat cram_fmt = { sequence_data, cram };
static const htsFormat sam_fmt = { sequence_data, sam };
static const htsFormat bam_fmt = { sequence_data, bam };
static const htsFormat cram_fmt = { sequence_data, cram };

int getopt_char;
while ((getopt_char = getopt(argc, argv, "v")) != -1) {
Expand Down

0 comments on commit 835bbac

Please sign in to comment.