updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / par2cmdline / 14-fixes-stupid-warnings.patch
blob8662a9e26667d20e73c7929069250aa8fd408ea1
1 --- a/verificationhashtable.h 2003-06-03 13:48:52.000000000 +0200
2 +++ b/verificationhashtable.h.new 2010-02-10 20:48:50.425580166 +0100
3 @@ -66,11 +66,11 @@ public:
4 // Comparison operators for searching
5 bool operator <(const VerificationHashEntry &r) const
7 - return crc < r.crc || crc == r.crc && hash < r.hash;
8 + return crc < r.crc || ( crc == r.crc && hash < r.hash );
10 bool operator >(const VerificationHashEntry &r) const
12 - return crc > r.crc || crc == r.crc && hash > r.hash;
13 + return crc > r.crc || ( crc == r.crc && hash > r.hash );
15 bool operator ==(const VerificationHashEntry &r) const
17 @@ -183,11 +183,11 @@ inline const VerificationHashEntry* Veri
19 while (entry)
21 - if (entry->crc < crc || entry->crc == crc && entry->hash < hash)
22 + if (entry->crc < crc || ( entry->crc == crc && entry->hash < hash ) )
24 entry = entry->right;
26 - else if (entry->crc > crc || entry->crc == crc && entry->hash > hash)
27 + else if (entry->crc > crc || ( entry->crc == crc && entry->hash > hash ) )
29 entry = entry->left;
31 @@ -402,14 +402,14 @@ inline const VerificationHashEntry* Veri
32 // have already been matched, or ones that are the wrong length
33 while (currententry && (currententry->SourceFile() != sourcefile ||
34 currententry->IsSet() ||
35 - checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength()
36 + ( checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength() )
40 // If we found an unused entry (which was presumably for the wrong
41 // source file) remember it (providing it is the correct length).
42 - if (0 == nextentry && !(currententry->IsSet() ||
43 - checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength()
44 + if ( ( ( 0 == nextentry && !(currententry->IsSet() ) ) ||
45 + ( checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength() )
49 @@ -425,8 +425,8 @@ inline const VerificationHashEntry* Veri
52 // Check for an unused entry which is the correct length
53 - while (nextentry && (nextentry->IsSet() ||
54 - checksummer.ShortBlock() && checksummer.BlockLength() != nextentry->GetDataBlock()->GetLength()
55 + while ( ( ( nextentry && (nextentry->IsSet() ) ) ||
56 + ( checksummer.ShortBlock() && checksummer.BlockLength() != nextentry->GetDataBlock()->GetLength() )
60 --- a/par1repairer.cpp 2004-04-15 15:40:48.000000000 +0200
61 +++ b/par1repairer.cpp.new 2010-02-10 21:04:43.288702325 +0100
62 @@ -324,7 +324,7 @@ bool Par1Repairer::LoadRecoveryFile(stri
64 (fileheader.datasize && (fileheader.dataoffset < sizeof(fileheader) || fileheader.dataoffset + fileheader.datasize > filesize))
66 - (fileheader.datasize && (fileheader.filelistoffset <= fileheader.dataoffset && fileheader.dataoffset < fileheader.filelistoffset+fileheader.filelistsize || fileheader.dataoffset <= fileheader.filelistoffset && fileheader.filelistoffset < fileheader.dataoffset + fileheader.datasize)))
67 + (fileheader.datasize && ( ( fileheader.filelistoffset <= fileheader.dataoffset && fileheader.dataoffset < fileheader.filelistoffset+fileheader.filelistsize ) || ( fileheader.dataoffset <= fileheader.filelistoffset && fileheader.filelistoffset < fileheader.dataoffset + fileheader.datasize ) )))
68 break;
70 // Check the size of the file list
71 @@ -518,9 +518,9 @@ bool Par1Repairer::LoadOtherRecoveryFile
72 // Check the the file extension is the correct form
73 if ((tail[0] == 'P' || tail[0] == 'p') &&
75 - (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r')
76 + ( (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r') )
78 - isdigit(tail[1]) && isdigit(tail[2])
79 + ( isdigit(tail[1]) && isdigit(tail[2]) )
82 LoadRecoveryFile(filename);
83 @@ -549,9 +549,9 @@ bool Par1Repairer::LoadExtraRecoveryFile
84 // Check the the file extension is the correct form
85 if ((tail[0] == 'P' || tail[0] == 'p') &&
87 - (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r')
88 + ( (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r') )
90 - isdigit(tail[1]) && isdigit(tail[2])
91 + ( isdigit(tail[1]) && isdigit(tail[2]) )
94 LoadRecoveryFile(filename);
95 @@ -652,9 +652,9 @@ bool Par1Repairer::VerifyExtraFiles(cons
96 // Check the the file extension is the correct form
97 if ((tail[0] == 'P' || tail[0] == 'p') &&
99 - (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r')
100 + ( (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r') )
102 - isdigit(tail[1]) && isdigit(tail[2])
103 + ( isdigit(tail[1]) && isdigit(tail[2]) )
106 skip = true;