Fossil SCM
Attempt to fix various harmless compiler warnings reported by Clang-15.
Commit
e486a0acbcf055644b1c3d8ac987c6b963baab82d57826256e8b71f6cc1fcaa2
Parent
ea57625d3137f51…
6 files changed
-6
+2
-4
+2
-3
-2
+2
-2
+1
-3
-6
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -660,11 +660,10 @@ | ||
| 660 | 660 | Blob dirname; |
| 661 | 661 | Manifest *pM = 0; |
| 662 | 662 | double rNow = 0; |
| 663 | 663 | char *zNow = 0; |
| 664 | 664 | int useMtime = atoi(PD("mtime","0")); |
| 665 | - int nFile = 0; /* Number of files (or folders with "nofiles") */ | |
| 666 | 665 | int linkTrunk = 1; /* include link to "trunk" */ |
| 667 | 666 | int linkTip = 1; /* include link to "tip" */ |
| 668 | 667 | const char *zRE; /* the value for the re=REGEXP query parameter */ |
| 669 | 668 | const char *zObjType; /* "files" by default or "folders" for "nofiles" */ |
| 670 | 669 | char *zREx = ""; /* Extra parameters for path hyperlinks */ |
| @@ -802,11 +801,10 @@ | ||
| 802 | 801 | if( nD>0 && (fossil_strncmp(zFile, zD, nD-1)!=0 || zFile[nD-1]!='/') ){ |
| 803 | 802 | continue; |
| 804 | 803 | } |
| 805 | 804 | if( pRE && re_match(pRE, (const unsigned char*)zFile, -1)==0 ) continue; |
| 806 | 805 | tree_add_node(&sTree, zFile, zUuid, mtime); |
| 807 | - nFile++; | |
| 808 | 806 | } |
| 809 | 807 | db_finalize(&q); |
| 810 | 808 | }else{ |
| 811 | 809 | Stmt q; |
| 812 | 810 | db_prepare(&q, |
| @@ -824,20 +822,16 @@ | ||
| 824 | 822 | if( nD>0 && (fossil_strncmp(zName, zD, nD-1)!=0 || zName[nD-1]!='/') ){ |
| 825 | 823 | continue; |
| 826 | 824 | } |
| 827 | 825 | if( pRE && re_match(pRE, (const u8*)zName, -1)==0 ) continue; |
| 828 | 826 | tree_add_node(&sTree, zName, zUuid, mtime); |
| 829 | - nFile++; | |
| 830 | 827 | } |
| 831 | 828 | db_finalize(&q); |
| 832 | 829 | } |
| 833 | 830 | style_submenu_checkbox("nofiles", "Folders Only", 0, 0); |
| 834 | 831 | |
| 835 | 832 | if( showDirOnly ){ |
| 836 | - for(nFile=0, p=sTree.pFirst; p; p=p->pNext){ | |
| 837 | - if( p->pChild!=0 && p->nFullName>nD ) nFile++; | |
| 838 | - } | |
| 839 | 833 | zObjType = "Folders"; |
| 840 | 834 | }else{ |
| 841 | 835 | zObjType = "Files"; |
| 842 | 836 | } |
| 843 | 837 | |
| 844 | 838 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -660,11 +660,10 @@ | |
| 660 | Blob dirname; |
| 661 | Manifest *pM = 0; |
| 662 | double rNow = 0; |
| 663 | char *zNow = 0; |
| 664 | int useMtime = atoi(PD("mtime","0")); |
| 665 | int nFile = 0; /* Number of files (or folders with "nofiles") */ |
| 666 | int linkTrunk = 1; /* include link to "trunk" */ |
| 667 | int linkTip = 1; /* include link to "tip" */ |
| 668 | const char *zRE; /* the value for the re=REGEXP query parameter */ |
| 669 | const char *zObjType; /* "files" by default or "folders" for "nofiles" */ |
| 670 | char *zREx = ""; /* Extra parameters for path hyperlinks */ |
| @@ -802,11 +801,10 @@ | |
| 802 | if( nD>0 && (fossil_strncmp(zFile, zD, nD-1)!=0 || zFile[nD-1]!='/') ){ |
| 803 | continue; |
| 804 | } |
| 805 | if( pRE && re_match(pRE, (const unsigned char*)zFile, -1)==0 ) continue; |
| 806 | tree_add_node(&sTree, zFile, zUuid, mtime); |
| 807 | nFile++; |
| 808 | } |
| 809 | db_finalize(&q); |
| 810 | }else{ |
| 811 | Stmt q; |
| 812 | db_prepare(&q, |
| @@ -824,20 +822,16 @@ | |
| 824 | if( nD>0 && (fossil_strncmp(zName, zD, nD-1)!=0 || zName[nD-1]!='/') ){ |
| 825 | continue; |
| 826 | } |
| 827 | if( pRE && re_match(pRE, (const u8*)zName, -1)==0 ) continue; |
| 828 | tree_add_node(&sTree, zName, zUuid, mtime); |
| 829 | nFile++; |
| 830 | } |
| 831 | db_finalize(&q); |
| 832 | } |
| 833 | style_submenu_checkbox("nofiles", "Folders Only", 0, 0); |
| 834 | |
| 835 | if( showDirOnly ){ |
| 836 | for(nFile=0, p=sTree.pFirst; p; p=p->pNext){ |
| 837 | if( p->pChild!=0 && p->nFullName>nD ) nFile++; |
| 838 | } |
| 839 | zObjType = "Folders"; |
| 840 | }else{ |
| 841 | zObjType = "Files"; |
| 842 | } |
| 843 | |
| 844 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -660,11 +660,10 @@ | |
| 660 | Blob dirname; |
| 661 | Manifest *pM = 0; |
| 662 | double rNow = 0; |
| 663 | char *zNow = 0; |
| 664 | int useMtime = atoi(PD("mtime","0")); |
| 665 | int linkTrunk = 1; /* include link to "trunk" */ |
| 666 | int linkTip = 1; /* include link to "tip" */ |
| 667 | const char *zRE; /* the value for the re=REGEXP query parameter */ |
| 668 | const char *zObjType; /* "files" by default or "folders" for "nofiles" */ |
| 669 | char *zREx = ""; /* Extra parameters for path hyperlinks */ |
| @@ -802,11 +801,10 @@ | |
| 801 | if( nD>0 && (fossil_strncmp(zFile, zD, nD-1)!=0 || zFile[nD-1]!='/') ){ |
| 802 | continue; |
| 803 | } |
| 804 | if( pRE && re_match(pRE, (const unsigned char*)zFile, -1)==0 ) continue; |
| 805 | tree_add_node(&sTree, zFile, zUuid, mtime); |
| 806 | } |
| 807 | db_finalize(&q); |
| 808 | }else{ |
| 809 | Stmt q; |
| 810 | db_prepare(&q, |
| @@ -824,20 +822,16 @@ | |
| 822 | if( nD>0 && (fossil_strncmp(zName, zD, nD-1)!=0 || zName[nD-1]!='/') ){ |
| 823 | continue; |
| 824 | } |
| 825 | if( pRE && re_match(pRE, (const u8*)zName, -1)==0 ) continue; |
| 826 | tree_add_node(&sTree, zName, zUuid, mtime); |
| 827 | } |
| 828 | db_finalize(&q); |
| 829 | } |
| 830 | style_submenu_checkbox("nofiles", "Folders Only", 0, 0); |
| 831 | |
| 832 | if( showDirOnly ){ |
| 833 | zObjType = "Folders"; |
| 834 | }else{ |
| 835 | zObjType = "Files"; |
| 836 | } |
| 837 | |
| 838 |
+2
-4
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -409,11 +409,10 @@ | ||
| 409 | 409 | int mxr; /* Maximum value for r */ |
| 410 | 410 | int na, nb; /* Number of lines shown from A and B */ |
| 411 | 411 | int i, j; /* Loop counters */ |
| 412 | 412 | int m; /* Number of lines to output */ |
| 413 | 413 | int skip; /* Number of lines to skip */ |
| 414 | - static int nChunk = 0; /* Number of diff chunks seen so far */ | |
| 415 | 414 | int nContext; /* Number of lines of context */ |
| 416 | 415 | int showLn; /* Show line numbers */ |
| 417 | 416 | int showDivider = 0; /* True to show the divider between diff blocks */ |
| 418 | 417 | |
| 419 | 418 | nContext = diff_context_lines(pCfg); |
| @@ -2070,11 +2069,11 @@ | ||
| 2070 | 2069 | ){ |
| 2071 | 2070 | int i, j, k; /* Loop counters */ |
| 2072 | 2071 | int *a; /* One row of the Wagner matrix */ |
| 2073 | 2072 | int *pToFree; /* Space that needs to be freed */ |
| 2074 | 2073 | unsigned char *aM; /* Wagner result matrix */ |
| 2075 | - int nMatch, iMatch; /* Number of matching lines and match score */ | |
| 2074 | + int iMatch; /* Matching match score */ | |
| 2076 | 2075 | int aBuf[100]; /* Stack space for a[] if nRight not to big */ |
| 2077 | 2076 | |
| 2078 | 2077 | if( nLeft==0 ){ |
| 2079 | 2078 | aM = fossil_malloc( nRight + 2 ); |
| 2080 | 2079 | memset(aM, 2, nRight); |
| @@ -2152,18 +2151,17 @@ | ||
| 2152 | 2151 | |
| 2153 | 2152 | /* Compute the lowest-cost path back through the matrix */ |
| 2154 | 2153 | i = nRight; |
| 2155 | 2154 | j = nLeft; |
| 2156 | 2155 | k = (nRight+1)*(nLeft+1)-1; |
| 2157 | - nMatch = iMatch = 0; | |
| 2156 | + iMatch = 0; | |
| 2158 | 2157 | while( i+j>0 ){ |
| 2159 | 2158 | unsigned char c = aM[k]; |
| 2160 | 2159 | if( c>=3 ){ |
| 2161 | 2160 | assert( i>0 && j>0 ); |
| 2162 | 2161 | i--; |
| 2163 | 2162 | j--; |
| 2164 | - nMatch++; | |
| 2165 | 2163 | iMatch += (c>>2); |
| 2166 | 2164 | aM[k] = 3; |
| 2167 | 2165 | }else if( c==2 ){ |
| 2168 | 2166 | assert( i>0 ); |
| 2169 | 2167 | i--; |
| 2170 | 2168 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -409,11 +409,10 @@ | |
| 409 | int mxr; /* Maximum value for r */ |
| 410 | int na, nb; /* Number of lines shown from A and B */ |
| 411 | int i, j; /* Loop counters */ |
| 412 | int m; /* Number of lines to output */ |
| 413 | int skip; /* Number of lines to skip */ |
| 414 | static int nChunk = 0; /* Number of diff chunks seen so far */ |
| 415 | int nContext; /* Number of lines of context */ |
| 416 | int showLn; /* Show line numbers */ |
| 417 | int showDivider = 0; /* True to show the divider between diff blocks */ |
| 418 | |
| 419 | nContext = diff_context_lines(pCfg); |
| @@ -2070,11 +2069,11 @@ | |
| 2070 | ){ |
| 2071 | int i, j, k; /* Loop counters */ |
| 2072 | int *a; /* One row of the Wagner matrix */ |
| 2073 | int *pToFree; /* Space that needs to be freed */ |
| 2074 | unsigned char *aM; /* Wagner result matrix */ |
| 2075 | int nMatch, iMatch; /* Number of matching lines and match score */ |
| 2076 | int aBuf[100]; /* Stack space for a[] if nRight not to big */ |
| 2077 | |
| 2078 | if( nLeft==0 ){ |
| 2079 | aM = fossil_malloc( nRight + 2 ); |
| 2080 | memset(aM, 2, nRight); |
| @@ -2152,18 +2151,17 @@ | |
| 2152 | |
| 2153 | /* Compute the lowest-cost path back through the matrix */ |
| 2154 | i = nRight; |
| 2155 | j = nLeft; |
| 2156 | k = (nRight+1)*(nLeft+1)-1; |
| 2157 | nMatch = iMatch = 0; |
| 2158 | while( i+j>0 ){ |
| 2159 | unsigned char c = aM[k]; |
| 2160 | if( c>=3 ){ |
| 2161 | assert( i>0 && j>0 ); |
| 2162 | i--; |
| 2163 | j--; |
| 2164 | nMatch++; |
| 2165 | iMatch += (c>>2); |
| 2166 | aM[k] = 3; |
| 2167 | }else if( c==2 ){ |
| 2168 | assert( i>0 ); |
| 2169 | i--; |
| 2170 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -409,11 +409,10 @@ | |
| 409 | int mxr; /* Maximum value for r */ |
| 410 | int na, nb; /* Number of lines shown from A and B */ |
| 411 | int i, j; /* Loop counters */ |
| 412 | int m; /* Number of lines to output */ |
| 413 | int skip; /* Number of lines to skip */ |
| 414 | int nContext; /* Number of lines of context */ |
| 415 | int showLn; /* Show line numbers */ |
| 416 | int showDivider = 0; /* True to show the divider between diff blocks */ |
| 417 | |
| 418 | nContext = diff_context_lines(pCfg); |
| @@ -2070,11 +2069,11 @@ | |
| 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); |
| @@ -2152,18 +2151,17 @@ | |
| 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 |
+2
-3
| --- src/popen.c | ||
| +++ src/popen.c | ||
| @@ -183,20 +183,19 @@ | ||
| 183 | 183 | return 1; |
| 184 | 184 | } |
| 185 | 185 | signal(SIGPIPE,SIG_IGN); |
| 186 | 186 | if( *pChildPid==0 ){ |
| 187 | 187 | int fd; |
| 188 | - int nErr = 0; | |
| 189 | 188 | /* This is the child process */ |
| 190 | 189 | close(0); |
| 191 | 190 | fd = dup(pout[0]); |
| 192 | - if( fd!=0 ) nErr++; | |
| 191 | + if( fd!=0 ) fossil_panic("popen() failed to open file descriptor 0"); | |
| 193 | 192 | close(pout[0]); |
| 194 | 193 | close(pout[1]); |
| 195 | 194 | close(1); |
| 196 | 195 | fd = dup(pin[1]); |
| 197 | - if( fd!=1 ) nErr++; | |
| 196 | + if( fd!=1 ) fossil_panic("popen() failed to open file descriptor 1"); | |
| 198 | 197 | close(pin[0]); |
| 199 | 198 | close(pin[1]); |
| 200 | 199 | if( bDirect ){ |
| 201 | 200 | execl(zCmd, zCmd, (char*)0); |
| 202 | 201 | }else{ |
| 203 | 202 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -183,20 +183,19 @@ | |
| 183 | return 1; |
| 184 | } |
| 185 | signal(SIGPIPE,SIG_IGN); |
| 186 | if( *pChildPid==0 ){ |
| 187 | int fd; |
| 188 | int nErr = 0; |
| 189 | /* This is the child process */ |
| 190 | close(0); |
| 191 | fd = dup(pout[0]); |
| 192 | if( fd!=0 ) nErr++; |
| 193 | close(pout[0]); |
| 194 | close(pout[1]); |
| 195 | close(1); |
| 196 | fd = dup(pin[1]); |
| 197 | if( fd!=1 ) nErr++; |
| 198 | close(pin[0]); |
| 199 | close(pin[1]); |
| 200 | if( bDirect ){ |
| 201 | execl(zCmd, zCmd, (char*)0); |
| 202 | }else{ |
| 203 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -183,20 +183,19 @@ | |
| 183 | return 1; |
| 184 | } |
| 185 | signal(SIGPIPE,SIG_IGN); |
| 186 | if( *pChildPid==0 ){ |
| 187 | int fd; |
| 188 | /* This is the child process */ |
| 189 | close(0); |
| 190 | fd = dup(pout[0]); |
| 191 | if( fd!=0 ) fossil_panic("popen() failed to open file descriptor 0"); |
| 192 | close(pout[0]); |
| 193 | close(pout[1]); |
| 194 | close(1); |
| 195 | fd = dup(pin[1]); |
| 196 | if( fd!=1 ) fossil_panic("popen() failed to open file descriptor 1"); |
| 197 | close(pin[0]); |
| 198 | close(pin[1]); |
| 199 | if( bDirect ){ |
| 200 | execl(zCmd, zCmd, (char*)0); |
| 201 | }else{ |
| 202 |
-2
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -45,11 +45,10 @@ | ||
| 45 | 45 | void view_list(void){ |
| 46 | 46 | const char *zScript; |
| 47 | 47 | Blob ril; /* Report Item List */ |
| 48 | 48 | Stmt q; |
| 49 | 49 | int rn = 0; |
| 50 | - int cnt = 0; | |
| 51 | 50 | char *defaultReport = db_get("ticket-default-report", 0); |
| 52 | 51 | |
| 53 | 52 | login_check_credentials(); |
| 54 | 53 | if( !g.perm.RdTkt && !g.perm.NewTkt ){ |
| 55 | 54 | login_needed(g.anon.RdTkt || g.anon.NewTkt); |
| @@ -70,11 +69,10 @@ | ||
| 70 | 69 | const char *zOwner = db_column_text(&q, 2); |
| 71 | 70 | if( zTitle[0] =='_' && !g.perm.TktFmt ){ |
| 72 | 71 | continue; |
| 73 | 72 | } |
| 74 | 73 | rn = db_column_int(&q, 0); |
| 75 | - cnt++; | |
| 76 | 74 | blob_appendf(&ril, "<li>"); |
| 77 | 75 | if( zTitle[0] == '_' ){ |
| 78 | 76 | blob_appendf(&ril, "%s", zTitle); |
| 79 | 77 | } else { |
| 80 | 78 | blob_appendf(&ril, "%z%h</a>", href("%R/rptview/%d", rn), zTitle); |
| 81 | 79 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -45,11 +45,10 @@ | |
| 45 | void view_list(void){ |
| 46 | const char *zScript; |
| 47 | Blob ril; /* Report Item List */ |
| 48 | Stmt q; |
| 49 | int rn = 0; |
| 50 | int cnt = 0; |
| 51 | char *defaultReport = db_get("ticket-default-report", 0); |
| 52 | |
| 53 | login_check_credentials(); |
| 54 | if( !g.perm.RdTkt && !g.perm.NewTkt ){ |
| 55 | login_needed(g.anon.RdTkt || g.anon.NewTkt); |
| @@ -70,11 +69,10 @@ | |
| 70 | const char *zOwner = db_column_text(&q, 2); |
| 71 | if( zTitle[0] =='_' && !g.perm.TktFmt ){ |
| 72 | continue; |
| 73 | } |
| 74 | rn = db_column_int(&q, 0); |
| 75 | cnt++; |
| 76 | blob_appendf(&ril, "<li>"); |
| 77 | if( zTitle[0] == '_' ){ |
| 78 | blob_appendf(&ril, "%s", zTitle); |
| 79 | } else { |
| 80 | blob_appendf(&ril, "%z%h</a>", href("%R/rptview/%d", rn), zTitle); |
| 81 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -45,11 +45,10 @@ | |
| 45 | void view_list(void){ |
| 46 | const char *zScript; |
| 47 | Blob ril; /* Report Item List */ |
| 48 | Stmt q; |
| 49 | int rn = 0; |
| 50 | char *defaultReport = db_get("ticket-default-report", 0); |
| 51 | |
| 52 | login_check_credentials(); |
| 53 | if( !g.perm.RdTkt && !g.perm.NewTkt ){ |
| 54 | login_needed(g.anon.RdTkt || g.anon.NewTkt); |
| @@ -70,11 +69,10 @@ | |
| 69 | const char *zOwner = db_column_text(&q, 2); |
| 70 | if( zTitle[0] =='_' && !g.perm.TktFmt ){ |
| 71 | continue; |
| 72 | } |
| 73 | rn = db_column_int(&q, 0); |
| 74 | blob_appendf(&ril, "<li>"); |
| 75 | if( zTitle[0] == '_' ){ |
| 76 | blob_appendf(&ril, "%s", zTitle); |
| 77 | } else { |
| 78 | blob_appendf(&ril, "%z%h</a>", href("%R/rptview/%d", rn), zTitle); |
| 79 |
+2
-2
| --- src/th_lang.c | ||
| +++ src/th_lang.c | ||
| @@ -1370,12 +1370,12 @@ | ||
| 1370 | 1370 | void *ctx, |
| 1371 | 1371 | int argc, |
| 1372 | 1372 | const char **argv, |
| 1373 | 1373 | int *argl |
| 1374 | 1374 | ){ |
| 1375 | - int cnt = 0; | |
| 1376 | - cnt++; | |
| 1375 | + static unsigned int cnt = 0; | |
| 1376 | + if( (cnt++)==0xffffffff ) printf("too many TH3 breakpoints\n"); | |
| 1377 | 1377 | return TH_OK; |
| 1378 | 1378 | } |
| 1379 | 1379 | |
| 1380 | 1380 | /* |
| 1381 | 1381 | ** Register the built-in th1 language commands with interpreter interp. |
| 1382 | 1382 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -1370,12 +1370,12 @@ | |
| 1370 | void *ctx, |
| 1371 | int argc, |
| 1372 | const char **argv, |
| 1373 | int *argl |
| 1374 | ){ |
| 1375 | int cnt = 0; |
| 1376 | cnt++; |
| 1377 | return TH_OK; |
| 1378 | } |
| 1379 | |
| 1380 | /* |
| 1381 | ** Register the built-in th1 language commands with interpreter interp. |
| 1382 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -1370,12 +1370,12 @@ | |
| 1370 | void *ctx, |
| 1371 | int argc, |
| 1372 | const char **argv, |
| 1373 | int *argl |
| 1374 | ){ |
| 1375 | static unsigned int cnt = 0; |
| 1376 | if( (cnt++)==0xffffffff ) printf("too many TH3 breakpoints\n"); |
| 1377 | return TH_OK; |
| 1378 | } |
| 1379 | |
| 1380 | /* |
| 1381 | ** Register the built-in th1 language commands with interpreter interp. |
| 1382 |
+1
-3
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1063,11 +1063,10 @@ | ||
| 1063 | 1063 | ** If HASH is different from the unversioned content hash on this server, |
| 1064 | 1064 | ** then send a bunch of uvigot cards, one for each entry unversioned file |
| 1065 | 1065 | ** on this server. |
| 1066 | 1066 | */ |
| 1067 | 1067 | static void send_unversioned_catalog(Xfer *pXfer){ |
| 1068 | - int nUvIgot = 0; | |
| 1069 | 1068 | Stmt uvq; |
| 1070 | 1069 | unversioned_schema(); |
| 1071 | 1070 | db_prepare(&uvq, |
| 1072 | 1071 | "SELECT name, mtime, hash, sz FROM unversioned" |
| 1073 | 1072 | ); |
| @@ -1074,11 +1073,10 @@ | ||
| 1074 | 1073 | while( db_step(&uvq)==SQLITE_ROW ){ |
| 1075 | 1074 | const char *zName = db_column_text(&uvq,0); |
| 1076 | 1075 | sqlite3_int64 mtime = db_column_int64(&uvq,1); |
| 1077 | 1076 | const char *zHash = db_column_text(&uvq,2); |
| 1078 | 1077 | int sz = db_column_int(&uvq,3); |
| 1079 | - nUvIgot++; | |
| 1080 | 1078 | if( zHash==0 ){ sz = 0; zHash = "-"; } |
| 1081 | 1079 | blob_appendf(pXfer->pOut, "uvigot %s %lld %s %d\n", |
| 1082 | 1080 | zName, mtime, zHash, sz); |
| 1083 | 1081 | } |
| 1084 | 1082 | db_finalize(&uvq); |
| @@ -1840,11 +1838,11 @@ | ||
| 1840 | 1838 | |
| 1841 | 1839 | /* Send the server timestamp last, in case prior processing happened |
| 1842 | 1840 | ** to use up a significant fraction of our time window. |
| 1843 | 1841 | */ |
| 1844 | 1842 | zNow = db_text(0, "SELECT strftime('%%Y-%%m-%%dT%%H:%%M:%%S', 'now')"); |
| 1845 | - @ # timestamp %s(zNow) | |
| 1843 | + @ # timestamp %s(zNow) errors %d(nErr) | |
| 1846 | 1844 | free(zNow); |
| 1847 | 1845 | |
| 1848 | 1846 | db_commit_transaction(); |
| 1849 | 1847 | configure_rebuild(); |
| 1850 | 1848 | } |
| 1851 | 1849 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1063,11 +1063,10 @@ | |
| 1063 | ** If HASH is different from the unversioned content hash on this server, |
| 1064 | ** then send a bunch of uvigot cards, one for each entry unversioned file |
| 1065 | ** on this server. |
| 1066 | */ |
| 1067 | static void send_unversioned_catalog(Xfer *pXfer){ |
| 1068 | int nUvIgot = 0; |
| 1069 | Stmt uvq; |
| 1070 | unversioned_schema(); |
| 1071 | db_prepare(&uvq, |
| 1072 | "SELECT name, mtime, hash, sz FROM unversioned" |
| 1073 | ); |
| @@ -1074,11 +1073,10 @@ | |
| 1074 | while( db_step(&uvq)==SQLITE_ROW ){ |
| 1075 | const char *zName = db_column_text(&uvq,0); |
| 1076 | sqlite3_int64 mtime = db_column_int64(&uvq,1); |
| 1077 | const char *zHash = db_column_text(&uvq,2); |
| 1078 | int sz = db_column_int(&uvq,3); |
| 1079 | nUvIgot++; |
| 1080 | if( zHash==0 ){ sz = 0; zHash = "-"; } |
| 1081 | blob_appendf(pXfer->pOut, "uvigot %s %lld %s %d\n", |
| 1082 | zName, mtime, zHash, sz); |
| 1083 | } |
| 1084 | db_finalize(&uvq); |
| @@ -1840,11 +1838,11 @@ | |
| 1840 | |
| 1841 | /* Send the server timestamp last, in case prior processing happened |
| 1842 | ** to use up a significant fraction of our time window. |
| 1843 | */ |
| 1844 | zNow = db_text(0, "SELECT strftime('%%Y-%%m-%%dT%%H:%%M:%%S', 'now')"); |
| 1845 | @ # timestamp %s(zNow) |
| 1846 | free(zNow); |
| 1847 | |
| 1848 | db_commit_transaction(); |
| 1849 | configure_rebuild(); |
| 1850 | } |
| 1851 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1063,11 +1063,10 @@ | |
| 1063 | ** If HASH is different from the unversioned content hash on this server, |
| 1064 | ** then send a bunch of uvigot cards, one for each entry unversioned file |
| 1065 | ** on this server. |
| 1066 | */ |
| 1067 | static void send_unversioned_catalog(Xfer *pXfer){ |
| 1068 | Stmt uvq; |
| 1069 | unversioned_schema(); |
| 1070 | db_prepare(&uvq, |
| 1071 | "SELECT name, mtime, hash, sz FROM unversioned" |
| 1072 | ); |
| @@ -1074,11 +1073,10 @@ | |
| 1073 | while( db_step(&uvq)==SQLITE_ROW ){ |
| 1074 | const char *zName = db_column_text(&uvq,0); |
| 1075 | sqlite3_int64 mtime = db_column_int64(&uvq,1); |
| 1076 | const char *zHash = db_column_text(&uvq,2); |
| 1077 | int sz = db_column_int(&uvq,3); |
| 1078 | if( zHash==0 ){ sz = 0; zHash = "-"; } |
| 1079 | blob_appendf(pXfer->pOut, "uvigot %s %lld %s %d\n", |
| 1080 | zName, mtime, zHash, sz); |
| 1081 | } |
| 1082 | db_finalize(&uvq); |
| @@ -1840,11 +1838,11 @@ | |
| 1838 | |
| 1839 | /* Send the server timestamp last, in case prior processing happened |
| 1840 | ** to use up a significant fraction of our time window. |
| 1841 | */ |
| 1842 | zNow = db_text(0, "SELECT strftime('%%Y-%%m-%%dT%%H:%%M:%%S', 'now')"); |
| 1843 | @ # timestamp %s(zNow) errors %d(nErr) |
| 1844 | free(zNow); |
| 1845 | |
| 1846 | db_commit_transaction(); |
| 1847 | configure_rebuild(); |
| 1848 | } |
| 1849 |