testdisk-6.14: 3 * possible bad if tests ?

How to use TestDisk to recover lost partition
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