Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix clang static analyzer warnings about deref null pointers and undefined values. There are still lots of dead code warnings, but those are harmless. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
630691456be672299dc569de4a898d6d |
| User & Date: | drh 2011-10-15 12:30:11.407 |
Context
|
2011-10-15
| ||
| 17:18 | Update to the Fossil-v-Git matrix. ... (check-in: a52287876c user: drh tags: trunk) | |
| 15:42 | Merge the latest trunk changes into the side-by-side diff branch. ... (check-in: 15de70c21f user: drh tags: jan-sbsdiff) | |
| 12:30 | Fix clang static analyzer warnings about deref null pointers and undefined values. There are still lots of dead code warnings, but those are harmless. ... (check-in: 630691456b user: drh tags: trunk) | |
| 12:16 | Mark functions that never return (ex: fossil_panic()) as such so that static analyzers can do a better job of pruning paths. ... (check-in: 86d2b4efc8 user: drh tags: trunk) | |
Changes
Changes to src/cgi.c.
| ︙ | ︙ | |||
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
if( nchildren>MAX_PARALLEL ){
/* Slow down if connections are arriving too fast */
sleep( nchildren-MAX_PARALLEL );
}
delay.tv_sec = 60;
delay.tv_usec = 0;
FD_ZERO(&readfds);
FD_SET( listener, &readfds);
select( listener+1, &readfds, 0, 0, &delay);
if( FD_ISSET(listener, &readfds) ){
lenaddr = sizeof(inaddr);
connection = accept(listener, (struct sockaddr*)&inaddr, &lenaddr);
if( connection>=0 ){
child = fork();
| > | 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 |
if( nchildren>MAX_PARALLEL ){
/* Slow down if connections are arriving too fast */
sleep( nchildren-MAX_PARALLEL );
}
delay.tv_sec = 60;
delay.tv_usec = 0;
FD_ZERO(&readfds);
assert( listener>=0 );
FD_SET( listener, &readfds);
select( listener+1, &readfds, 0, 0, &delay);
if( FD_ISSET(listener, &readfds) ){
lenaddr = sizeof(inaddr);
connection = accept(listener, (struct sockaddr*)&inaddr, &lenaddr);
if( connection>=0 ){
child = fork();
|
| ︙ | ︙ |
Changes to src/http.c.
| ︙ | ︙ | |||
134 135 136 137 138 139 140 |
*/
int http_exchange(Blob *pSend, Blob *pReply, int useLogin){
Blob login; /* The login card */
Blob payload; /* The complete payload including login card */
Blob hdr; /* The HTTP request header */
int closeConnection; /* True to close the connection when done */
int iLength; /* Length of the reply payload */
| | | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
*/
int http_exchange(Blob *pSend, Blob *pReply, int useLogin){
Blob login; /* The login card */
Blob payload; /* The complete payload including login card */
Blob hdr; /* The HTTP request header */
int closeConnection; /* True to close the connection when done */
int iLength; /* Length of the reply payload */
int rc = 0; /* Result code */
int iHttpVersion; /* Which version of HTTP protocol server uses */
char *zLine; /* A single line of the reply header */
int i; /* Loop counter */
int isError = 0; /* True if the reply is an error message */
int isCompressed = 1; /* True if the reply is compressed */
if( transport_open() ){
|
| ︙ | ︙ |
Changes to src/path.c.
| ︙ | ︙ | |||
93 94 95 96 97 98 99 | bag_clear(&path.seen); memset(&path, 0, sizeof(&path)); } /* ** Construct the path from path.pStart to path.pEnd in the u.pTo fields. */ | | > | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
bag_clear(&path.seen);
memset(&path, 0, sizeof(&path));
}
/*
** Construct the path from path.pStart to path.pEnd in the u.pTo fields.
*/
static void path_reverse_path(void){
PathNode *p;
assert( path.pEnd!=0 );
for(p=path.pEnd; p && p->pFrom; p = p->pFrom){
p->pFrom->u.pTo = p;
}
path.pEnd->u.pTo = 0;
assert( p==path.pStart );
}
|
| ︙ | ︙ |