khowe / quicktree

Fast implementation of the neighbour-joining phylogenetic inference method
Apache License 2.0
21 stars 5 forks source link

compiler warning fscanf signed -> unsigned int #10

Open smoe opened 4 years ago

smoe commented 4 years ago

I know, it seems rather unlikely that that distances will exceed MAXINT/2 ... anyway. Cheers, Steffen

cc -g -O2 -fdebug-prefix-map=/home/moeller/git/med-team/quicktree/quicktree-2.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -Wunused-result -c -I./include -o ./sequence.o ./src/sequence.c
./src/distancemat.c: In function ‘read_phylip_DistanceMatrix’:
./src/distancemat.c:389:27: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘unsigned int *’ [-Wformat=]
  389 |   if (! fscanf( handle, "%d", &size ))
      |                          ~^   ~~~~~
      |                           |   |
      |                           |   unsigned int *
      |                           int *
      |                          %d
./src/distancemat.c:410:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  410 |     while(c = fgetc(handle)) {
      |           ^