testdisk-6.14: 3 * possible bad if tests ?

How to use TestDisk to recover lost partition
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
Post Reply
Message
Author
dcb314
Posts: 1
Joined: 29 Oct 2013, 15:38

testdisk-6.14: 3 * possible bad if tests ?

#1 Post by dcb314 » 29 Oct 2013, 15:45

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.

Sponsored links

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest