Skip to content

Commit

Permalink
Add a few more warnings.
Browse files Browse the repository at this point in the history
The -Wimplicit-fallthrough one spotted a genuine error too where the
new "samtools split -p" accidentally also enabled --no-PG.
  • Loading branch information
jkbonfield committed Aug 20, 2024
1 parent 948b940 commit 245250e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ rocky_task:
LC_ALL: C
CIRRUS_CLONE_DEPTH: 1
HTSDIR: ./hidden-htslib
CFLAGS: -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wno-unused-parameter -Wno-error=old-style-declaration

# NB: we could consider building a docker image with these
# preinstalled and specifying that instead, to speed up testing.
Expand Down
2 changes: 1 addition & 1 deletion bam_sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -3079,7 +3079,7 @@ static void *worker(void *data)
break;
case MinHash:
worker_minhash(w);
// no break, go to merge sort
// fall-through
default:
ks_mergesort(sort, w->buf_len, w->buf, 0);
}
Expand Down
2 changes: 2 additions & 0 deletions bam_split.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,12 @@ static parsed_opts_t* parse_args(int argc, char** argv)
return NULL;
}
retval->zero_pad = (int) val;
break;
}
case 1:
retval->no_pg = 1;
break;

default:
if (parse_sam_global_opt(opt, optarg, lopts, &retval->ga) == 0) break;
/* else fall-through */
Expand Down

0 comments on commit 245250e

Please sign in to comment.