Fossil SCM

Fix another harmless compiler warning reported by Clang-15.

danield 2023-02-03 15:59 trunk
Commit de184889a7ddda2a2d3e8b6a2d5502d2a293e3043a22266f9625be0741cb0e06
1 file changed -3
-3
--- src/diff.c
+++ src/diff.c
@@ -2069,11 +2069,10 @@
20692069
){
20702070
int i, j, k; /* Loop counters */
20712071
int *a; /* One row of the Wagner matrix */
20722072
int *pToFree; /* Space that needs to be freed */
20732073
unsigned char *aM; /* Wagner result matrix */
2074
- int iMatch; /* Matching match score */
20752074
int aBuf[100]; /* Stack space for a[] if nRight not to big */
20762075
20772076
if( nLeft==0 ){
20782077
aM = fossil_malloc( nRight + 2 );
20792078
memset(aM, 2, nRight);
@@ -2151,18 +2150,16 @@
21512150
21522151
/* Compute the lowest-cost path back through the matrix */
21532152
i = nRight;
21542153
j = nLeft;
21552154
k = (nRight+1)*(nLeft+1)-1;
2156
- iMatch = 0;
21572155
while( i+j>0 ){
21582156
unsigned char c = aM[k];
21592157
if( c>=3 ){
21602158
assert( i>0 && j>0 );
21612159
i--;
21622160
j--;
2163
- iMatch += (c>>2);
21642161
aM[k] = 3;
21652162
}else if( c==2 ){
21662163
assert( i>0 );
21672164
i--;
21682165
}else{
21692166
--- src/diff.c
+++ src/diff.c
@@ -2069,11 +2069,10 @@
2069 ){
2070 int i, j, k; /* Loop counters */
2071 int *a; /* One row of the Wagner matrix */
2072 int *pToFree; /* Space that needs to be freed */
2073 unsigned char *aM; /* Wagner result matrix */
2074 int iMatch; /* Matching match score */
2075 int aBuf[100]; /* Stack space for a[] if nRight not to big */
2076
2077 if( nLeft==0 ){
2078 aM = fossil_malloc( nRight + 2 );
2079 memset(aM, 2, nRight);
@@ -2151,18 +2150,16 @@
2151
2152 /* Compute the lowest-cost path back through the matrix */
2153 i = nRight;
2154 j = nLeft;
2155 k = (nRight+1)*(nLeft+1)-1;
2156 iMatch = 0;
2157 while( i+j>0 ){
2158 unsigned char c = aM[k];
2159 if( c>=3 ){
2160 assert( i>0 && j>0 );
2161 i--;
2162 j--;
2163 iMatch += (c>>2);
2164 aM[k] = 3;
2165 }else if( c==2 ){
2166 assert( i>0 );
2167 i--;
2168 }else{
2169
--- src/diff.c
+++ src/diff.c
@@ -2069,11 +2069,10 @@
2069 ){
2070 int i, j, k; /* Loop counters */
2071 int *a; /* One row of the Wagner matrix */
2072 int *pToFree; /* Space that needs to be freed */
2073 unsigned char *aM; /* Wagner result matrix */
 
2074 int aBuf[100]; /* Stack space for a[] if nRight not to big */
2075
2076 if( nLeft==0 ){
2077 aM = fossil_malloc( nRight + 2 );
2078 memset(aM, 2, nRight);
@@ -2151,18 +2150,16 @@
2150
2151 /* Compute the lowest-cost path back through the matrix */
2152 i = nRight;
2153 j = nLeft;
2154 k = (nRight+1)*(nLeft+1)-1;
 
2155 while( i+j>0 ){
2156 unsigned char c = aM[k];
2157 if( c>=3 ){
2158 assert( i>0 && j>0 );
2159 i--;
2160 j--;
 
2161 aM[k] = 3;
2162 }else if( c==2 ){
2163 assert( i>0 );
2164 i--;
2165 }else{
2166

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button