Fossil SCM
Fixed many uninitialized variable warnings and some potential bug found via -Wall -Werror on gcc.
Commit
e63a9fd9d0356a19c3c29bf847943122c415420e
Parent
cfc7984edead9fa…
12 files changed
+2
-2
+1
-1
+1
-1
+2
-2
+2
+3
+2
+1
-1
+1
-1
+2
-2
+3
-1
+1
-1
+2
-2
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1022,11 +1022,11 @@ | ||
| 1022 | 1022 | cgi_setenv("REQUEST_URI", zToken); |
| 1023 | 1023 | for(i=0; zToken[i] && zToken[i]!='?'; i++){} |
| 1024 | 1024 | if( zToken[i] ) zToken[i++] = 0; |
| 1025 | 1025 | cgi_setenv("PATH_INFO", zToken); |
| 1026 | 1026 | cgi_setenv("QUERY_STRING", &zToken[i]); |
| 1027 | - if( getpeername(fileno(stdin), (struct sockaddr*)&remoteName, &size)>=0 ){ | |
| 1027 | + if( getpeername(fileno(stdin), (struct sockaddr*)&remoteName, (socklen_t*)&size)>=0 ){ | |
| 1028 | 1028 | char *zIpAddr = inet_ntoa(remoteName.sin_addr); |
| 1029 | 1029 | cgi_setenv("REMOTE_ADDR", zIpAddr); |
| 1030 | 1030 | |
| 1031 | 1031 | /* Set the Global.zIpAddr variable to the server we are talking to. |
| 1032 | 1032 | ** This is used to populate the ipaddr column of the rcvfrom table, |
| @@ -1125,11 +1125,11 @@ | ||
| 1125 | 1125 | delay.tv_usec = 0; |
| 1126 | 1126 | FD_ZERO(&readfds); |
| 1127 | 1127 | FD_SET( listener, &readfds); |
| 1128 | 1128 | if( select( listener+1, &readfds, 0, 0, &delay) ){ |
| 1129 | 1129 | lenaddr = sizeof(inaddr); |
| 1130 | - connection = accept(listener, (struct sockaddr*)&inaddr, &lenaddr); | |
| 1130 | + connection = accept(listener, (struct sockaddr*)&inaddr, (socklen_t*) &lenaddr); | |
| 1131 | 1131 | if( connection>=0 ){ |
| 1132 | 1132 | child = fork(); |
| 1133 | 1133 | if( child!=0 ){ |
| 1134 | 1134 | if( child>0 ) nchildren++; |
| 1135 | 1135 | close(connection); |
| 1136 | 1136 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1022,11 +1022,11 @@ | |
| 1022 | cgi_setenv("REQUEST_URI", zToken); |
| 1023 | for(i=0; zToken[i] && zToken[i]!='?'; i++){} |
| 1024 | if( zToken[i] ) zToken[i++] = 0; |
| 1025 | cgi_setenv("PATH_INFO", zToken); |
| 1026 | cgi_setenv("QUERY_STRING", &zToken[i]); |
| 1027 | if( getpeername(fileno(stdin), (struct sockaddr*)&remoteName, &size)>=0 ){ |
| 1028 | char *zIpAddr = inet_ntoa(remoteName.sin_addr); |
| 1029 | cgi_setenv("REMOTE_ADDR", zIpAddr); |
| 1030 | |
| 1031 | /* Set the Global.zIpAddr variable to the server we are talking to. |
| 1032 | ** This is used to populate the ipaddr column of the rcvfrom table, |
| @@ -1125,11 +1125,11 @@ | |
| 1125 | delay.tv_usec = 0; |
| 1126 | FD_ZERO(&readfds); |
| 1127 | FD_SET( listener, &readfds); |
| 1128 | if( select( listener+1, &readfds, 0, 0, &delay) ){ |
| 1129 | lenaddr = sizeof(inaddr); |
| 1130 | connection = accept(listener, (struct sockaddr*)&inaddr, &lenaddr); |
| 1131 | if( connection>=0 ){ |
| 1132 | child = fork(); |
| 1133 | if( child!=0 ){ |
| 1134 | if( child>0 ) nchildren++; |
| 1135 | close(connection); |
| 1136 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1022,11 +1022,11 @@ | |
| 1022 | cgi_setenv("REQUEST_URI", zToken); |
| 1023 | for(i=0; zToken[i] && zToken[i]!='?'; i++){} |
| 1024 | if( zToken[i] ) zToken[i++] = 0; |
| 1025 | cgi_setenv("PATH_INFO", zToken); |
| 1026 | cgi_setenv("QUERY_STRING", &zToken[i]); |
| 1027 | if( getpeername(fileno(stdin), (struct sockaddr*)&remoteName, (socklen_t*)&size)>=0 ){ |
| 1028 | char *zIpAddr = inet_ntoa(remoteName.sin_addr); |
| 1029 | cgi_setenv("REMOTE_ADDR", zIpAddr); |
| 1030 | |
| 1031 | /* Set the Global.zIpAddr variable to the server we are talking to. |
| 1032 | ** This is used to populate the ipaddr column of the rcvfrom table, |
| @@ -1125,11 +1125,11 @@ | |
| 1125 | delay.tv_usec = 0; |
| 1126 | FD_ZERO(&readfds); |
| 1127 | FD_SET( listener, &readfds); |
| 1128 | if( select( listener+1, &readfds, 0, 0, &delay) ){ |
| 1129 | lenaddr = sizeof(inaddr); |
| 1130 | connection = accept(listener, (struct sockaddr*)&inaddr, (socklen_t*) &lenaddr); |
| 1131 | if( connection>=0 ){ |
| 1132 | child = fork(); |
| 1133 | if( child!=0 ){ |
| 1134 | if( child>0 ) nchildren++; |
| 1135 | close(connection); |
| 1136 |
+1
-1
| --- src/delta.c | ||
| +++ src/delta.c | ||
| @@ -334,11 +334,11 @@ | ||
| 334 | 334 | ** literal sections of the delta. |
| 335 | 335 | */ |
| 336 | 336 | base = 0; /* We have already generated everything before zOut[base] */ |
| 337 | 337 | while( base+NHASH<lenOut ){ |
| 338 | 338 | int iSrc, iBlock; |
| 339 | - unsigned int bestCnt, bestOfst, bestLitsz; | |
| 339 | + unsigned int bestCnt, bestOfst=0, bestLitsz=0; | |
| 340 | 340 | hash_init(&h, &zOut[base]); |
| 341 | 341 | i = 0; /* Trying to match a landmark against zOut[base+i] */ |
| 342 | 342 | bestCnt = 0; |
| 343 | 343 | while( 1 ){ |
| 344 | 344 | int hv; |
| 345 | 345 |
| --- src/delta.c | |
| +++ src/delta.c | |
| @@ -334,11 +334,11 @@ | |
| 334 | ** literal sections of the delta. |
| 335 | */ |
| 336 | base = 0; /* We have already generated everything before zOut[base] */ |
| 337 | while( base+NHASH<lenOut ){ |
| 338 | int iSrc, iBlock; |
| 339 | unsigned int bestCnt, bestOfst, bestLitsz; |
| 340 | hash_init(&h, &zOut[base]); |
| 341 | i = 0; /* Trying to match a landmark against zOut[base+i] */ |
| 342 | bestCnt = 0; |
| 343 | while( 1 ){ |
| 344 | int hv; |
| 345 |
| --- src/delta.c | |
| +++ src/delta.c | |
| @@ -334,11 +334,11 @@ | |
| 334 | ** literal sections of the delta. |
| 335 | */ |
| 336 | base = 0; /* We have already generated everything before zOut[base] */ |
| 337 | while( base+NHASH<lenOut ){ |
| 338 | int iSrc, iBlock; |
| 339 | unsigned int bestCnt, bestOfst=0, bestLitsz=0; |
| 340 | hash_init(&h, &zOut[base]); |
| 341 | i = 0; /* Trying to match a landmark against zOut[base+i] */ |
| 342 | bestCnt = 0; |
| 343 | while( 1 ){ |
| 344 | int hv; |
| 345 |
+1
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -174,11 +174,11 @@ | ||
| 174 | 174 | #endif |
| 175 | 175 | |
| 176 | 176 | x = y = 0; |
| 177 | 177 | cnt = nContext; |
| 178 | 178 | while( x<nA || y<nB ){ |
| 179 | - int t1, t2; | |
| 179 | + int t1=0, t2=0; | |
| 180 | 180 | if( (t1 = M(x+1,y))<0 || (t2 = M(x,y+1))<0 ){ |
| 181 | 181 | if( cnt>=nContext ){ |
| 182 | 182 | blob_appendf(pOut, "@@ -%d +%d @@\n", |
| 183 | 183 | x-nContext+iStart+2, y-nContext+iStart+2); |
| 184 | 184 | for(i=x-nContext+1; i<x; i++){ |
| 185 | 185 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -174,11 +174,11 @@ | |
| 174 | #endif |
| 175 | |
| 176 | x = y = 0; |
| 177 | cnt = nContext; |
| 178 | while( x<nA || y<nB ){ |
| 179 | int t1, t2; |
| 180 | if( (t1 = M(x+1,y))<0 || (t2 = M(x,y+1))<0 ){ |
| 181 | if( cnt>=nContext ){ |
| 182 | blob_appendf(pOut, "@@ -%d +%d @@\n", |
| 183 | x-nContext+iStart+2, y-nContext+iStart+2); |
| 184 | for(i=x-nContext+1; i<x; i++){ |
| 185 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -174,11 +174,11 @@ | |
| 174 | #endif |
| 175 | |
| 176 | x = y = 0; |
| 177 | cnt = nContext; |
| 178 | while( x<nA || y<nB ){ |
| 179 | int t1=0, t2=0; |
| 180 | if( (t1 = M(x+1,y))<0 || (t2 = M(x,y+1))<0 ){ |
| 181 | if( cnt>=nContext ){ |
| 182 | blob_appendf(pOut, "@@ -%d +%d @@\n", |
| 183 | x-nContext+iStart+2, y-nContext+iStart+2); |
| 184 | for(i=x-nContext+1; i<x; i++){ |
| 185 |
+2
-2
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -189,11 +189,11 @@ | ||
| 189 | 189 | blob_set(pOut, zOrigName); |
| 190 | 190 | blob_materialize(pOut); |
| 191 | 191 | }else{ |
| 192 | 192 | char zPwd[2000]; |
| 193 | 193 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 194 | - fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20); | |
| 194 | + fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20); | |
| 195 | 195 | exit(1); |
| 196 | 196 | } |
| 197 | 197 | blob_zero(pOut); |
| 198 | 198 | blob_appendf(pOut, "%//%/", zPwd, zOrigName); |
| 199 | 199 | } |
| @@ -228,11 +228,11 @@ | ||
| 228 | 228 | if( zPath[0]=='/' ){ |
| 229 | 229 | int i, j; |
| 230 | 230 | Blob tmp; |
| 231 | 231 | char zPwd[2000]; |
| 232 | 232 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 233 | - fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20); | |
| 233 | + fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20); | |
| 234 | 234 | exit(1); |
| 235 | 235 | } |
| 236 | 236 | for(i=1; zPath[i] && zPwd[i]==zPath[i]; i++){} |
| 237 | 237 | if( zPath[i]==0 ){ |
| 238 | 238 | blob_reset(pOut); |
| 239 | 239 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -189,11 +189,11 @@ | |
| 189 | blob_set(pOut, zOrigName); |
| 190 | blob_materialize(pOut); |
| 191 | }else{ |
| 192 | char zPwd[2000]; |
| 193 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 194 | fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20); |
| 195 | exit(1); |
| 196 | } |
| 197 | blob_zero(pOut); |
| 198 | blob_appendf(pOut, "%//%/", zPwd, zOrigName); |
| 199 | } |
| @@ -228,11 +228,11 @@ | |
| 228 | if( zPath[0]=='/' ){ |
| 229 | int i, j; |
| 230 | Blob tmp; |
| 231 | char zPwd[2000]; |
| 232 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 233 | fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20); |
| 234 | exit(1); |
| 235 | } |
| 236 | for(i=1; zPath[i] && zPwd[i]==zPath[i]; i++){} |
| 237 | if( zPath[i]==0 ){ |
| 238 | blob_reset(pOut); |
| 239 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -189,11 +189,11 @@ | |
| 189 | blob_set(pOut, zOrigName); |
| 190 | blob_materialize(pOut); |
| 191 | }else{ |
| 192 | char zPwd[2000]; |
| 193 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 194 | fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20); |
| 195 | exit(1); |
| 196 | } |
| 197 | blob_zero(pOut); |
| 198 | blob_appendf(pOut, "%//%/", zPwd, zOrigName); |
| 199 | } |
| @@ -228,11 +228,11 @@ | |
| 228 | if( zPath[0]=='/' ){ |
| 229 | int i, j; |
| 230 | Blob tmp; |
| 231 | char zPwd[2000]; |
| 232 | if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ |
| 233 | fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20); |
| 234 | exit(1); |
| 235 | } |
| 236 | for(i=1; zPath[i] && zPwd[i]==zPath[i]; i++){} |
| 237 | if( zPath[i]==0 ){ |
| 238 | blob_reset(pOut); |
| 239 |
+2
| --- src/http.c | ||
| +++ src/http.c | ||
| @@ -121,10 +121,11 @@ | ||
| 121 | 121 | signal(SIGPIPE, SIG_IGN); |
| 122 | 122 | #endif |
| 123 | 123 | return 0; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | +#ifdef __MINGW32__ | |
| 126 | 127 | /* |
| 127 | 128 | ** Read the socket until a newline '\n' is found. Return the number |
| 128 | 129 | ** of characters read. pSockId contains the socket handel. pOut |
| 129 | 130 | ** contains a pointer to the buffer to write to. pOutSize contains |
| 130 | 131 | ** the maximum size of the line that pOut can handle. |
| @@ -167,10 +168,11 @@ | ||
| 167 | 168 | } |
| 168 | 169 | blob_append(pBlob, rbuf, read); |
| 169 | 170 | } |
| 170 | 171 | return blob_size(pBlob); |
| 171 | 172 | } |
| 173 | +#endif | |
| 172 | 174 | |
| 173 | 175 | /* |
| 174 | 176 | ** Make a single attempt to talk to the server. Return TRUE on success |
| 175 | 177 | ** and FALSE on a failure. |
| 176 | 178 | ** |
| 177 | 179 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -121,10 +121,11 @@ | |
| 121 | signal(SIGPIPE, SIG_IGN); |
| 122 | #endif |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | /* |
| 127 | ** Read the socket until a newline '\n' is found. Return the number |
| 128 | ** of characters read. pSockId contains the socket handel. pOut |
| 129 | ** contains a pointer to the buffer to write to. pOutSize contains |
| 130 | ** the maximum size of the line that pOut can handle. |
| @@ -167,10 +168,11 @@ | |
| 167 | } |
| 168 | blob_append(pBlob, rbuf, read); |
| 169 | } |
| 170 | return blob_size(pBlob); |
| 171 | } |
| 172 | |
| 173 | /* |
| 174 | ** Make a single attempt to talk to the server. Return TRUE on success |
| 175 | ** and FALSE on a failure. |
| 176 | ** |
| 177 |
| --- src/http.c | |
| +++ src/http.c | |
| @@ -121,10 +121,11 @@ | |
| 121 | signal(SIGPIPE, SIG_IGN); |
| 122 | #endif |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | #ifdef __MINGW32__ |
| 127 | /* |
| 128 | ** Read the socket until a newline '\n' is found. Return the number |
| 129 | ** of characters read. pSockId contains the socket handel. pOut |
| 130 | ** contains a pointer to the buffer to write to. pOutSize contains |
| 131 | ** the maximum size of the line that pOut can handle. |
| @@ -167,10 +168,11 @@ | |
| 168 | } |
| 169 | blob_append(pBlob, rbuf, read); |
| 170 | } |
| 171 | return blob_size(pBlob); |
| 172 | } |
| 173 | #endif |
| 174 | |
| 175 | /* |
| 176 | ** Make a single attempt to talk to the server. Return TRUE on success |
| 177 | ** and FALSE on a failure. |
| 178 | ** |
| 179 |
+3
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -572,10 +572,13 @@ | ||
| 572 | 572 | tid = uuid_to_rid(m.aTag[i].zUuid, 1); |
| 573 | 573 | switch( m.aTag[i].zName[0] ){ |
| 574 | 574 | case '+': type = 1; break; |
| 575 | 575 | case '*': type = 2; break; |
| 576 | 576 | case '-': type = 0; break; |
| 577 | + default: | |
| 578 | + fossil_fatal("unknown tag type in manifest: %s", m.aTag); | |
| 579 | + return 0; | |
| 577 | 580 | } |
| 578 | 581 | tag_insert(&m.aTag[i].zName[1], type, m.aTag[i].zValue, |
| 579 | 582 | rid, m.rDate, tid); |
| 580 | 583 | } |
| 581 | 584 | if( parentid ){ |
| 582 | 585 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -572,10 +572,13 @@ | |
| 572 | tid = uuid_to_rid(m.aTag[i].zUuid, 1); |
| 573 | switch( m.aTag[i].zName[0] ){ |
| 574 | case '+': type = 1; break; |
| 575 | case '*': type = 2; break; |
| 576 | case '-': type = 0; break; |
| 577 | } |
| 578 | tag_insert(&m.aTag[i].zName[1], type, m.aTag[i].zValue, |
| 579 | rid, m.rDate, tid); |
| 580 | } |
| 581 | if( parentid ){ |
| 582 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -572,10 +572,13 @@ | |
| 572 | tid = uuid_to_rid(m.aTag[i].zUuid, 1); |
| 573 | switch( m.aTag[i].zName[0] ){ |
| 574 | case '+': type = 1; break; |
| 575 | case '*': type = 2; break; |
| 576 | case '-': type = 0; break; |
| 577 | default: |
| 578 | fossil_fatal("unknown tag type in manifest: %s", m.aTag); |
| 579 | return 0; |
| 580 | } |
| 581 | tag_insert(&m.aTag[i].zName[1], type, m.aTag[i].zValue, |
| 582 | rid, m.rDate, tid); |
| 583 | } |
| 584 | if( parentid ){ |
| 585 |
+2
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -99,10 +99,12 @@ | ||
| 99 | 99 | rc = 1; |
| 100 | 100 | }else{ |
| 101 | 101 | rc = 0; |
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | + }else{ | |
| 105 | + rc = 0; | |
| 104 | 106 | } |
| 105 | 107 | return rc; |
| 106 | 108 | } |
| 107 | 109 | |
| 108 | 110 | /* |
| 109 | 111 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -99,10 +99,12 @@ | |
| 99 | rc = 1; |
| 100 | }else{ |
| 101 | rc = 0; |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | return rc; |
| 106 | } |
| 107 | |
| 108 | /* |
| 109 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -99,10 +99,12 @@ | |
| 99 | rc = 1; |
| 100 | }else{ |
| 101 | rc = 0; |
| 102 | } |
| 103 | } |
| 104 | }else{ |
| 105 | rc = 0; |
| 106 | } |
| 107 | return rc; |
| 108 | } |
| 109 | |
| 110 | /* |
| 111 |
+1
-1
| --- src/pivot.c | ||
| +++ src/pivot.c | ||
| @@ -82,11 +82,11 @@ | ||
| 82 | 82 | ** the secondaries. Return its rid. Return 0 if no common ancestor |
| 83 | 83 | ** can be found. |
| 84 | 84 | */ |
| 85 | 85 | int pivot_find(void){ |
| 86 | 86 | Stmt q1, q2, u1, i1; |
| 87 | - int rid; | |
| 87 | + int rid = 0; | |
| 88 | 88 | |
| 89 | 89 | /* aqueue must contain at least one primary and one other. Otherwise |
| 90 | 90 | ** we abort early |
| 91 | 91 | */ |
| 92 | 92 | if( db_int(0, "SELECT count(distinct src) FROM aqueue")<2 ){ |
| 93 | 93 |
| --- src/pivot.c | |
| +++ src/pivot.c | |
| @@ -82,11 +82,11 @@ | |
| 82 | ** the secondaries. Return its rid. Return 0 if no common ancestor |
| 83 | ** can be found. |
| 84 | */ |
| 85 | int pivot_find(void){ |
| 86 | Stmt q1, q2, u1, i1; |
| 87 | int rid; |
| 88 | |
| 89 | /* aqueue must contain at least one primary and one other. Otherwise |
| 90 | ** we abort early |
| 91 | */ |
| 92 | if( db_int(0, "SELECT count(distinct src) FROM aqueue")<2 ){ |
| 93 |
| --- src/pivot.c | |
| +++ src/pivot.c | |
| @@ -82,11 +82,11 @@ | |
| 82 | ** the secondaries. Return its rid. Return 0 if no common ancestor |
| 83 | ** can be found. |
| 84 | */ |
| 85 | int pivot_find(void){ |
| 86 | Stmt q1, q2, u1, i1; |
| 87 | int rid = 0; |
| 88 | |
| 89 | /* aqueue must contain at least one primary and one other. Otherwise |
| 90 | ** we abort early |
| 91 | */ |
| 92 | if( db_int(0, "SELECT count(distinct src) FROM aqueue")<2 ){ |
| 93 |
+1
-1
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -108,12 +108,12 @@ | ||
| 108 | 108 | if( !g.noPswd ){ |
| 109 | 109 | @ | <a href="%s(g.zBaseURL)/login">%s(zLogInOut)</a> |
| 110 | 110 | } |
| 111 | 111 | @ </div> |
| 112 | 112 | if( nSubmenu>0 ){ |
| 113 | - @ <div id="sub-menu"> | |
| 114 | 113 | int i; |
| 114 | + @ <div id="sub-menu"> | |
| 115 | 115 | qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare); |
| 116 | 116 | for(i=0; i<nSubmenu; i++){ |
| 117 | 117 | struct Submenu *p = &aSubmenu[i]; |
| 118 | 118 | char *zTail = i<nSubmenu-1 ? " | " : ""; |
| 119 | 119 | if( p->zLink==0 ){ |
| 120 | 120 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -108,12 +108,12 @@ | |
| 108 | if( !g.noPswd ){ |
| 109 | @ | <a href="%s(g.zBaseURL)/login">%s(zLogInOut)</a> |
| 110 | } |
| 111 | @ </div> |
| 112 | if( nSubmenu>0 ){ |
| 113 | @ <div id="sub-menu"> |
| 114 | int i; |
| 115 | qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare); |
| 116 | for(i=0; i<nSubmenu; i++){ |
| 117 | struct Submenu *p = &aSubmenu[i]; |
| 118 | char *zTail = i<nSubmenu-1 ? " | " : ""; |
| 119 | if( p->zLink==0 ){ |
| 120 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -108,12 +108,12 @@ | |
| 108 | if( !g.noPswd ){ |
| 109 | @ | <a href="%s(g.zBaseURL)/login">%s(zLogInOut)</a> |
| 110 | } |
| 111 | @ </div> |
| 112 | if( nSubmenu>0 ){ |
| 113 | int i; |
| 114 | @ <div id="sub-menu"> |
| 115 | qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare); |
| 116 | for(i=0; i<nSubmenu; i++){ |
| 117 | struct Submenu *p = &aSubmenu[i]; |
| 118 | char *zTail = i<nSubmenu-1 ? " | " : ""; |
| 119 | if( p->zLink==0 ){ |
| 120 |
+2
-2
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -32,12 +32,12 @@ | ||
| 32 | 32 | ** autosync must start with 1, y or Y. The last-sync-url must also be |
| 33 | 33 | ** defined. |
| 34 | 34 | */ |
| 35 | 35 | int do_autosync(void){ |
| 36 | 36 | const char *zAutoSync = db_global_get("autosync", 0); |
| 37 | - if( zAutoSync != 0 | |
| 38 | - && (zAutoSync[0]=='1' || zAutoSync[0]=='y' || zAutoSync=='Y') | |
| 37 | + if( zAutoSync!=0 | |
| 38 | + && (zAutoSync[0]=='1' || zAutoSync[0]=='y' || zAutoSync[0]=='Y') | |
| 39 | 39 | && db_get("last-sync-url", 0)!=0 ){ |
| 40 | 40 | return 1; |
| 41 | 41 | }else{ |
| 42 | 42 | return 0; |
| 43 | 43 | } |
| 44 | 44 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -32,12 +32,12 @@ | |
| 32 | ** autosync must start with 1, y or Y. The last-sync-url must also be |
| 33 | ** defined. |
| 34 | */ |
| 35 | int do_autosync(void){ |
| 36 | const char *zAutoSync = db_global_get("autosync", 0); |
| 37 | if( zAutoSync != 0 |
| 38 | && (zAutoSync[0]=='1' || zAutoSync[0]=='y' || zAutoSync=='Y') |
| 39 | && db_get("last-sync-url", 0)!=0 ){ |
| 40 | return 1; |
| 41 | }else{ |
| 42 | return 0; |
| 43 | } |
| 44 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -32,12 +32,12 @@ | |
| 32 | ** autosync must start with 1, y or Y. The last-sync-url must also be |
| 33 | ** defined. |
| 34 | */ |
| 35 | int do_autosync(void){ |
| 36 | const char *zAutoSync = db_global_get("autosync", 0); |
| 37 | if( zAutoSync!=0 |
| 38 | && (zAutoSync[0]=='1' || zAutoSync[0]=='y' || zAutoSync[0]=='Y') |
| 39 | && db_get("last-sync-url", 0)!=0 ){ |
| 40 | return 1; |
| 41 | }else{ |
| 42 | return 0; |
| 43 | } |
| 44 |
+3
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -232,11 +232,13 @@ | ||
| 232 | 232 | zTag = g.argv[2]; |
| 233 | 233 | switch( zTag[0] ){ |
| 234 | 234 | case '+': tagtype = 1; break; |
| 235 | 235 | case '*': tagtype = 2; break; |
| 236 | 236 | case '-': tagtype = 0; break; |
| 237 | - default: fossil_fatal("tag should begin with '+', '*', or '-'"); | |
| 237 | + default: | |
| 238 | + fossil_fatal("tag should begin with '+', '*', or '-'"); | |
| 239 | + return; | |
| 238 | 240 | } |
| 239 | 241 | rid = name_to_rid(g.argv[3]); |
| 240 | 242 | if( rid==0 ){ |
| 241 | 243 | fossil_fatal("no such object: %s", g.argv[3]); |
| 242 | 244 | } |
| 243 | 245 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -232,11 +232,13 @@ | |
| 232 | zTag = g.argv[2]; |
| 233 | switch( zTag[0] ){ |
| 234 | case '+': tagtype = 1; break; |
| 235 | case '*': tagtype = 2; break; |
| 236 | case '-': tagtype = 0; break; |
| 237 | default: fossil_fatal("tag should begin with '+', '*', or '-'"); |
| 238 | } |
| 239 | rid = name_to_rid(g.argv[3]); |
| 240 | if( rid==0 ){ |
| 241 | fossil_fatal("no such object: %s", g.argv[3]); |
| 242 | } |
| 243 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -232,11 +232,13 @@ | |
| 232 | zTag = g.argv[2]; |
| 233 | switch( zTag[0] ){ |
| 234 | case '+': tagtype = 1; break; |
| 235 | case '*': tagtype = 2; break; |
| 236 | case '-': tagtype = 0; break; |
| 237 | default: |
| 238 | fossil_fatal("tag should begin with '+', '*', or '-'"); |
| 239 | return; |
| 240 | } |
| 241 | rid = name_to_rid(g.argv[3]); |
| 242 | if( rid==0 ){ |
| 243 | fossil_fatal("no such object: %s", g.argv[3]); |
| 244 | } |
| 245 |
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -396,11 +396,11 @@ | ||
| 396 | 396 | */ |
| 397 | 397 | void print_timeline(Stmt *q, int mxLine){ |
| 398 | 398 | int nLine = 0; |
| 399 | 399 | char zPrevDate[20]; |
| 400 | 400 | char *delims; |
| 401 | - const char *zCurrentUuid; | |
| 401 | + const char *zCurrentUuid=0; | |
| 402 | 402 | Stmt currentQ; |
| 403 | 403 | int rid = db_lget_int("checkout", 0); |
| 404 | 404 | zPrevDate[0] = 0; |
| 405 | 405 | |
| 406 | 406 | db_prepare(¤tQ, |
| 407 | 407 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -396,11 +396,11 @@ | |
| 396 | */ |
| 397 | void print_timeline(Stmt *q, int mxLine){ |
| 398 | int nLine = 0; |
| 399 | char zPrevDate[20]; |
| 400 | char *delims; |
| 401 | const char *zCurrentUuid; |
| 402 | Stmt currentQ; |
| 403 | int rid = db_lget_int("checkout", 0); |
| 404 | zPrevDate[0] = 0; |
| 405 | |
| 406 | db_prepare(¤tQ, |
| 407 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -396,11 +396,11 @@ | |
| 396 | */ |
| 397 | void print_timeline(Stmt *q, int mxLine){ |
| 398 | int nLine = 0; |
| 399 | char zPrevDate[20]; |
| 400 | char *delims; |
| 401 | const char *zCurrentUuid=0; |
| 402 | Stmt currentQ; |
| 403 | int rid = db_lget_int("checkout", 0); |
| 404 | zPrevDate[0] = 0; |
| 405 | |
| 406 | db_prepare(¤tQ, |
| 407 |