Possible mistakes in if/then syntax
dmacks opened this issue · 1 comments
Building tcoffee-11.00.8cbe486 on OS X 10.8 with Xcode5.1 (clang compiler) and gcc5 (via fink) for other compilers gives me a bunch of -Wempty-body warnings. They are for code such as:
dp_lib/evaluate.c:1946:13: warning: if statement has empty body [-Wempty-body]
if (w);free_int (w, -1);
^
dp_lib/evaluate.c:1946:13: note: put the semicolon on a separate line to silence this warning
It's seeing the first semicolon as the end of the whole if/then, not the end of the "if" clause (that feels like a bash syntax?), which would mean free_int is not in the "then" block. A total of 8 such warnings scattered. Let me know if this is indeed a correct detection of a mistake and I'll pull out the rest from by build logs.
Thanks a lot Daniel,
I have just checked. This is not a bug because the free_int function
checks for empty pointers, but it is clearly bad programming style. I
have fixed this instance and a few others. They will get committed next
time I push the code.
Cheers,
Cedric
On 27/6/15 8:32 AM, Daniel Macks wrote:
Building tcoffee-11.00.8cbe486 on OS X 10.8 with Xcode5.1 (clang
compiler) and gcc5 (via fink) for other compilers gives me a bunch of
-Wempty-body warnings. They are for code such as:|dp_lib/evaluate.c:1946:13: warning: if statement has empty body [-Wempty-body]
if (w);free_int (w, -1);
^
dp_lib/evaluate.c:1946:13: note: put the semicolon on a separate line to silence this warning
|It's seeing the first semicolon as the end of the whole if/then, not
the end of the "if" clause (that feels like a bash syntax?), which
would mean free_int is not in the "then" block. A total of 8 such
warnings scattered. Let me know if this is indeed a correct detection
of a mistake and I'll pull out the rest from by build logs.—
Reply to this email directly or view it on GitHub
#5.
##########################################
Dr Cedric Notredame
Group Leader
Notredame's lab - Comparative Bioinformatics Group
Bioinformatics and Genomics Programme
Room 440.03
Centre de Regulació Genòmica (CRG)
Dr. Aiguader, 88
08003 Barcelona
Spain
Ph# + 34 93 316 02 71
Fax# + 34 93 316 00 99
Mobile# + 34 66 250 47 82
email cedric.notredame@crg.eu
url www.tcoffee.org
blog cedricnotredame.blogspot.com
ORC-ID: 0000-0003-1461-0988
###########################################