patch some compile warnings

This commit is contained in:
Eric Coissac
2024-05-23 17:46:00 +02:00
parent 92826de147
commit 8c1668faa4
8 changed files with 15 additions and 10 deletions

View File

@ -794,6 +794,10 @@ int main(int argc, char **argv)
} }
} }
if (errflag) {
ExitUsage(1);
}
options.pnparm = &nnparams; options.pnparm = &nnparams;
if (options.saltmethod != 2) //if not SALT_METHOD_OWCZARZY if (options.saltmethod != 2) //if not SALT_METHOD_OWCZARZY
options.saltmethod = SALT_METHOD_SANTALUCIA; //then force SALT_METHOD_SANTALUCIA options.saltmethod = SALT_METHOD_SANTALUCIA; //then force SALT_METHOD_SANTALUCIA

View File

@ -195,7 +195,7 @@ ecoseq_t *ecoseq_iterator(const char *prefix)
{ {
static FILE *current_seq_file= NULL; static FILE *current_seq_file= NULL;
static int32_t current_file_idx = 1; static int32_t current_file_idx = 1;
static char current_prefix[1024]; static char current_prefix[1025];
ecoseq_t *seq; ecoseq_t *seq;
if (prefix) if (prefix)

View File

@ -32,7 +32,7 @@ ecotxidx_t *read_taxonomyidx(const char *filename,const char *filename2)
fprintf(stderr,"Reading %d taxa...\n",count); fprintf(stderr,"Reading %d taxa...\n",count);
for (i=0; i < count; i++){ for (i=0; i < count; i++){
readnext_ecotaxon(f,&(index->taxon[i])); readnext_ecotaxon(f,&(index->taxon[i]));
index->taxon[i].parent=index->taxon + (int32_t)index->taxon[i].parent; index->taxon[i].parent=index->taxon + (int64_t)index->taxon[i].parent;
} }
if (count2>0) if (count2>0)
@ -42,7 +42,7 @@ ecotxidx_t *read_taxonomyidx(const char *filename,const char *filename2)
for (i=0; i < count2; i++){ for (i=0; i < count2; i++){
readnext_ecotaxon(f2,&(index->taxon[count+i])); readnext_ecotaxon(f2,&(index->taxon[count+i]));
index->taxon[count+i].parent=index->taxon + (int32_t)index->taxon[count+i].parent; index->taxon[count+i].parent=index->taxon + (int64_t)index->taxon[count+i].parent;
} }
return index; return index;

View File

@ -39,7 +39,7 @@ int32_t ManberNoErr(pecoseq_t pseq,ppattern_t pat,
u_int32_t pos; u_int32_t pos;
uint32_t smask, r; uint32_t smask, r;
uint8_t *data; uint8_t *data;
int32_t end; uint32_t end;
end = (size_t)(pseq->SQ_length); end = (size_t)(pseq->SQ_length);
@ -88,7 +88,7 @@ int32_t ManberSub(pecoseq_t pseq,ppattern_t pat,
uint32_t smask, cmask, sindx; uint32_t smask, cmask, sindx;
uint32_t *pr, r[2 * MAX_PAT_ERR + 2]; uint32_t *pr, r[2 * MAX_PAT_ERR + 2];
uint8_t *data; uint8_t *data;
int32_t end; uint32_t end;
end = (size_t)(pseq->SQ_length); end = (size_t)(pseq->SQ_length);

View File

@ -59,7 +59,7 @@ void encodeSequence(ecoseq_t *seq)
data = (uint8_t*)(seq->SQ); data = (uint8_t*)(seq->SQ);
cseq = seq->SQ; cseq = seq->SQ;
for (i=0;i<seq->SQ_length;i++,data++,cseq++) for (i=0;i<(int)(seq->SQ_length);i++,data++,cseq++)
{ {
*data = encoder[(IS_UPPER(*cseq) ? *cseq : 'Z') - 'A']; *data = encoder[(IS_UPPER(*cseq) ? *cseq : 'Z') - 'A'];
} }

View File

@ -250,8 +250,7 @@ void CursiToTop(StackiPtr stki)
} /* end of CursiToTop */ } /* end of CursiToTop */
void CursiToBottom(stki) void CursiToBottom(StackiPtr stki)
StackiPtr stki;
{ {
stki->cursor = 0; stki->cursor = 0;

View File

@ -16,6 +16,7 @@
#include "ecotype.h" #include "ecotype.h"
#include <stdint.h>
/* ==================================================== */ /* ==================================================== */
/* Constantes de dimensionnement */ /* Constantes de dimensionnement */
@ -85,5 +86,6 @@ bool_t SearchDownStacki (StackiPtr stki , int32_t sval );
bool_t BinSearchStacki (StackiPtr stki , int32_t sval ); bool_t BinSearchStacki (StackiPtr stki , int32_t sval );
bool_t SameStacki (StackiPtr stki1 , StackiPtr stki2 ); bool_t SameStacki (StackiPtr stki1 , StackiPtr stki2 );
bool_t ReverseStacki (StackiPtr stki ); bool_t ReverseStacki (StackiPtr stki );
void CursiToBottom (StackiPtr stki );
#endif /* _H_libstki */ #endif /* _H_libstki */

View File

@ -41,7 +41,7 @@ void ecomerge(pwordcount_t data,uint32_t s1,uint32_t s2,uint32_t remainingSeq,ui
uint32_t currentcount,tmpcount; uint32_t currentcount,tmpcount;
int same; int same;
queue_t queue; queue_t queue;
int nsame=0; // int nsame=0;
uint32_t maxcount=0; uint32_t maxcount=0;
bool_t writed=TRUE; bool_t writed=TRUE;
@ -103,7 +103,7 @@ void ecomerge(pwordcount_t data,uint32_t s1,uint32_t s2,uint32_t remainingSeq,ui
* record if the two words in the both subtable are the same * record if the two words in the both subtable are the same
*/ */
same = (source != S2) && (WORD(currentword) == WORD(merged.words[merged.read2])); same = (source != S2) && (WORD(currentword) == WORD(merged.words[merged.read2]));
nsame+=same; // nsame+=same;
// DEBUG_LOG("Merging : r1 = %d s1 = %d r2 = %d size = %d word = %s source=%u same=%u",merged.read1,s1,merged.read2-s1,merged.size,ecoUnhashWord(currentword,18),source,same) // DEBUG_LOG("Merging : r1 = %d s1 = %d r2 = %d size = %d word = %s source=%u same=%u",merged.read1,s1,merged.read2-s1,merged.size,ecoUnhashWord(currentword,18),source,same)