Fossil SCM
Fix another harmless compiler warning reported by Clang-15.
Commit
de184889a7ddda2a2d3e8b6a2d5502d2a293e3043a22266f9625be0741cb0e06
Parent
e486a0acbcf0556…
1 file changed
-3
-3
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -2069,11 +2069,10 @@ | ||
| 2069 | 2069 | ){ |
| 2070 | 2070 | int i, j, k; /* Loop counters */ |
| 2071 | 2071 | int *a; /* One row of the Wagner matrix */ |
| 2072 | 2072 | int *pToFree; /* Space that needs to be freed */ |
| 2073 | 2073 | unsigned char *aM; /* Wagner result matrix */ |
| 2074 | - int iMatch; /* Matching match score */ | |
| 2075 | 2074 | int aBuf[100]; /* Stack space for a[] if nRight not to big */ |
| 2076 | 2075 | |
| 2077 | 2076 | if( nLeft==0 ){ |
| 2078 | 2077 | aM = fossil_malloc( nRight + 2 ); |
| 2079 | 2078 | memset(aM, 2, nRight); |
| @@ -2151,18 +2150,16 @@ | ||
| 2151 | 2150 | |
| 2152 | 2151 | /* Compute the lowest-cost path back through the matrix */ |
| 2153 | 2152 | i = nRight; |
| 2154 | 2153 | j = nLeft; |
| 2155 | 2154 | k = (nRight+1)*(nLeft+1)-1; |
| 2156 | - iMatch = 0; | |
| 2157 | 2155 | while( i+j>0 ){ |
| 2158 | 2156 | unsigned char c = aM[k]; |
| 2159 | 2157 | if( c>=3 ){ |
| 2160 | 2158 | assert( i>0 && j>0 ); |
| 2161 | 2159 | i--; |
| 2162 | 2160 | j--; |
| 2163 | - iMatch += (c>>2); | |
| 2164 | 2161 | aM[k] = 3; |
| 2165 | 2162 | }else if( c==2 ){ |
| 2166 | 2163 | assert( i>0 ); |
| 2167 | 2164 | i--; |
| 2168 | 2165 | }else{ |
| 2169 | 2166 |
| --- 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 |