Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler warnings int vs long int #223

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

smoe
Copy link
Contributor

@smoe smoe commented Sep 2, 2020

cd /home/moeller/git/med-team/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/BedpePrinter.cpp.o -c /home/moeller/git/med-team/sniffles/src/print/BedpePrinter.cpp
/home/moeller/git/med-team/sniffles/src/print/BedpePrinter.cpp: In member function ‘virtual void BedpePrinter::print_body(Breakpoint*&, BamTools::RefVector)’:
/home/moeller/git/med-team/sniffles/src/print/BedpePrinter.cpp:99:21: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
   99 |     fprintf(file, "%i", SV->get_length());
      |                    ~^   ~~~~~~~~~~~~~~~~
      |                     |                 |
      |                     int               long int
      |                    %li
/home/moeller/git/med-team/sniffles/src/print/BedpePrinter.cpp: In member function ‘virtual void BedpePrinter::print_body_recall(Breakpoint*&, BamTools::RefVector)’:
/home/moeller/git/med-team/sniffles/src/print/BedpePrinter.cpp:123:18: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
  123 |  fprintf(file, "%i", IPrinter::calc_pos(SV->get_coordinates().start.max_pos, ref, chr));
      |                 ~^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  |                     |
      |                  int                   long int
      |                 %li
/home/moeller/git/med-team/sniffles/src/print/BedpePrinter.cpp:130:18: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
  130 |  fprintf(file, "%i", IPrinter::calc_pos(SV->get_coordinates().stop.max_pos, ref, chr));
      |                 ~^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  |                     |
      |                  int                   long int
      |                 %li
/home/moeller/git/med-team/sniffles/src/print/BedpePrinter.cpp:158:19: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
  158 |   fprintf(file, "%i", SV->get_length());
      |                  ~^   ~~~~~~~~~~~~~~~~
      |                   |                 |
      |                   int               long int
      |                  %li

@fritzsedlazeck fritzsedlazeck merged commit e3d166a into fritzsedlazeck:master Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants