ea-utils icon indicating copy to clipboard operation
ea-utils copied to clipboard

fastq-mcf sink into dead circulation when getopt_long

Open songdongmei opened this issue 8 years ago • 0 comments

When I run fastq-mcf with the following command: ./fastq-mcf /home/adapters/TruSeq3-PE.fa /home/data/test.read1.fq , it seems the program sink into dead circulation.

I use gdb to debug what happened, then navigate to this location: 271 while ( (c = getopt_long(argc, argv, "-nf0uXUVHKSRdbehp:o:O:l:s:m:t:k:x:P:q:L:C:w:F:D:",long_options,&option_inde x)) != -1) { after all options( in my case, it means adapter file and reads file ) are gotten, value of variable "c" becomes "255", not "-1", so it can't get out of the while loop.

And I man getopt_long function, it shows that return value of this function is "int" type. But in fastq-mcf.cpp, it defines return value as "char" type 203 char c;

I change this line, and fastq-mcf could work correctly.

songdongmei avatar Oct 09 '18 02:10 songdongmei