fritzsedlazeck / Sniffles

Structural variation caller using third generation sequencing
Other
561 stars 95 forks source link

Warnings in fprintf format specification #226

Closed smoe closed 2 years ago

smoe commented 4 years ago

These seem like very easy to fix - was tempted to guess a patch, but ... better leaving this to you.

cd .../sniffles/obj-x86_64-linux-gnu/src && /usr/bin/c++   -I/usr/include/bamtools -I/home/moeller/git/med-team/sniffles/src/../lib/bamtools-2.3.0/src -I/home/moeller/git/med-team/sniffles/src/../lib/tclap-1.2.1/include  -g -O2 -fdebug-prefix-map=/home/moeller/git/med-team/sniffles=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fopenmp   -o CMakeFiles/sniffles.dir/print/IPrinter.cpp.o -c /home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp: In function ‘void write_read(Alignment*, FILE*&)’:
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:21:29: warning: unknown conversion type character ‘r’ in format [-Wformat=]
   21 |  fprintf(ref_allel_reads, "%ref_plus", '\t');
      |                             ^
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:21:27: warning: too many arguments for format [-Wformat-extra-args]
   21 |  fprintf(ref_allel_reads, "%ref_plus", '\t');
      |                           ^~~~~~~~~~~
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:23:29: warning: unknown conversion type character ‘r’ in format [-Wformat=]
   23 |  fprintf(ref_allel_reads, "%ref_plus", '\t');
      |                             ^
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:23:27: warning: too many arguments for format [-Wformat-extra-args]
   23 |  fprintf(ref_allel_reads, "%ref_plus", '\t');
      |                           ^~~~~~~~~~~
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:24:29: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
   24 |  fprintf(ref_allel_reads, "%i", tmp_aln->getRefLength());
      |                            ~^   ~~~~~~~~~~~~~~~~~~~~~~~
      |                             |                        |
      |                             int                      size_t {aka long unsigned int}
      |                            %li
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:25:29: warning: unknown conversion type character ‘r’ in format [-Wformat=]
   25 |  fprintf(ref_allel_reads, "%ref_plus", '\t');
      |                             ^
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:25:27: warning: too many arguments for format [-Wformat-extra-args]
   25 |  fprintf(ref_allel_reads, "%ref_plus", '\t');
      |                           ^~~~~~~~~~~
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:27:30: warning: unknown conversion type character ‘r’ in format [-Wformat=]
   27 |   fprintf(ref_allel_reads, "%ref_plus", '1');
      |                              ^
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:27:28: warning: too many arguments for format [-Wformat-extra-args]
   27 |   fprintf(ref_allel_reads, "%ref_plus", '1');
      |                            ^~~~~~~~~~~
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:29:30: warning: unknown conversion type character ‘r’ in format [-Wformat=]
   29 |   fprintf(ref_allel_reads, "%ref_plus", '2');
      |                              ^
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:29:28: warning: too many arguments for format [-Wformat-extra-args]
   29 |   fprintf(ref_allel_reads, "%ref_plus", '2');
      |                            ^~~~~~~~~~~
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:31:29: warning: unknown conversion type character ‘r’ in format [-Wformat=]
   31 |  fprintf(ref_allel_reads, "%ref_plus", '\n');
      |                             ^
/home/moeller/git/med-team/sniffles/src/print/IPrinter.cpp:31:27: warning: too many arguments for format [-Wformat-extra-args]
   31 |  fprintf(ref_allel_reads, "%ref_plus", '\n');
      |                           ^~~~~~~~~~~
fritzsedlazeck commented 2 years ago

We just pushed a completely new version of Sniffles (v2.0.0.2) and hope this will be resolved.