Hello there,
I just compiled testdisk-6.14 with extra Linux gcc flag -Wlogical-op
It said
1.
file_dbf.c:56:3: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
Source code is
if(buffer[0]==0x3 && (buffer[1]>80 || buffer[1]<120) &&
Suggest swap || for &&
2.
file_jpg.c:1567:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op]
Source code is
if(buffer[buffer_size/2]==0xff && buffer[buffer_size/2]==0xd8 &&
3.
file_jpg.c:1622:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op]
if(buffer[buffer_size/2]==0xff && buffer[buffer_size/2]==0xd8 &&
Duplicate.
testdisk-6.14: 3 * possible bad if tests ?
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf