Skip to content

Commit

Permalink
Merge pull request #8 from tseemann/GoogleImport
Browse files Browse the repository at this point in the history
Use correct unsigned format %u for scanf target
  • Loading branch information
hyattpd committed Feb 18, 2015
2 parents b172028 + 3db5fc6 commit e4bf41b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,14 +657,12 @@ void help() {
fprintf(stderr, " -g: Specify a translation table to use (default");
fprintf(stderr, " 11).\n");
fprintf(stderr, " -h: Print help menu and exit.\n");
fprintf(stderr, " -i: Specify input file (default reads from ");
fprintf(stderr, "stdin).\n");
fprintf(stderr, " -m: Treat runs of n's as masked sequence and do");
fprintf(stderr, " not build genes across \n");
fprintf(stderr, " them.\n");
fprintf(stderr, " -n: Bypass the Shine-Dalgarno trainer and force");
fprintf(stderr, " the program to scan\n");
fprintf(stderr, " for motifs.\n");
fprintf(stderr, " -i: Specify FASTA/Genbank input file (default ");
fprintf(stderr, "reads from stdin).\n");
fprintf(stderr, " -m: Treat runs of N as masked sequence; don't");
fprintf(stderr, " build genes across them.\n");
fprintf(stderr, " -n: Bypass Shine-Dalgarno trainer and force");
fprintf(stderr, " a full motif scan.\n");
fprintf(stderr, " -o: Specify output file (default writes to ");
fprintf(stderr, "stdout).\n");
fprintf(stderr, " -p: Select procedure (single or meta). Default");
Expand Down
4 changes: 2 additions & 2 deletions sequence.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int read_seq_training(FILE *fp, unsigned char *seq, unsigned char *useq,
else if(hdr == 1 && (line[0] == '/' && line[1] == '/')) hdr = 0;
else if(hdr == 1) {
if(strstr(line, "Expand") != NULL && strstr(line, "gap") != NULL) {
sscanf(strstr(line, "gap")+4, "%d", &gapsize);
sscanf(strstr(line, "gap")+4, "%u", &gapsize);
if(gapsize < 1 || gapsize > MAX_LINE) {
fprintf(stderr, "Error: gap size in gbk file can't exceed line");
fprintf(stderr, " size.\n");
Expand Down Expand Up @@ -169,7 +169,7 @@ int next_seq_multi(FILE *fp, unsigned char *seq, unsigned char *useq,
}
else if(reading_seq == 1) {
if(strstr(line, "Expand") != NULL && strstr(line, "gap") != NULL) {
sscanf(strstr(line, "gap")+4, "%d", &gapsize);
sscanf(strstr(line, "gap")+4, "%u", &gapsize);
if(gapsize < 1 || gapsize > MAX_LINE) {
fprintf(stderr, "Error: gap size in gbk file can't exceed line");
fprintf(stderr, " size.\n");
Expand Down

0 comments on commit e4bf41b

Please sign in to comment.