Overview
SHA1 Hash: | 92291035fe251899a61464d304c16973ee241da0 |
---|---|
Date: | 2007-09-25 21:28:30 |
User: | jnc |
Comment: | Merged the compiler warning fixes into mainstream |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/cgi.c from [57f4d7daa3] to [5b9875dd08].
@@ -1022,11 +1022,11 @@ cgi_setenv("REQUEST_URI", zToken); for(i=0; zToken[i] && zToken[i]!='?'; i++){} if( zToken[i] ) zToken[i++] = 0; cgi_setenv("PATH_INFO", zToken); cgi_setenv("QUERY_STRING", &zToken[i]); - if( getpeername(fileno(stdin), (struct sockaddr*)&remoteName, &size)>=0 ){ + if( getpeername(fileno(stdin), (struct sockaddr*)&remoteName, (socklen_t*)&size)>=0 ){ char *zIpAddr = inet_ntoa(remoteName.sin_addr); cgi_setenv("REMOTE_ADDR", zIpAddr); /* Set the Global.zIpAddr variable to the server we are talking to. ** This is used to populate the ipaddr column of the rcvfrom table, @@ -1125,11 +1125,11 @@ delay.tv_usec = 0; FD_ZERO(&readfds); FD_SET( listener, &readfds); if( select( listener+1, &readfds, 0, 0, &delay) ){ lenaddr = sizeof(inaddr); - connection = accept(listener, (struct sockaddr*)&inaddr, &lenaddr); + connection = accept(listener, (struct sockaddr*)&inaddr, (socklen_t*) &lenaddr); if( connection>=0 ){ child = fork(); if( child!=0 ){ if( child>0 ) nchildren++; close(connection);
Modified src/delta.c from [e79479fc0f] to [c73001b47f].
@@ -334,11 +334,11 @@ ** literal sections of the delta. */ base = 0; /* We have already generated everything before zOut[base] */ while( base+NHASH<lenOut ){ int iSrc, iBlock; - unsigned int bestCnt, bestOfst, bestLitsz; + unsigned int bestCnt, bestOfst=0, bestLitsz=0; hash_init(&h, &zOut[base]); i = 0; /* Trying to match a landmark against zOut[base+i] */ bestCnt = 0; while( 1 ){ int hv;
Modified src/diff.c from [43924b3721] to [a87d303450].
@@ -174,11 +174,11 @@ #endif x = y = 0; cnt = nContext; while( x<nA || y<nB ){ - int t1, t2; + int t1=0, t2=0; if( (t1 = M(x+1,y))<0 || (t2 = M(x,y+1))<0 ){ if( cnt>=nContext ){ blob_appendf(pOut, "@@ -%d +%d @@\n", x-nContext+iStart+2, y-nContext+iStart+2); for(i=x-nContext+1; i<x; i++){
Modified src/file.c from [525e8c0661] to [be58713833].
@@ -189,11 +189,11 @@ blob_set(pOut, zOrigName); blob_materialize(pOut); }else{ char zPwd[2000]; if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ - fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20); + fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20); exit(1); } blob_zero(pOut); blob_appendf(pOut, "%//%/", zPwd, zOrigName); } @@ -228,11 +228,11 @@ if( zPath[0]=='/' ){ int i, j; Blob tmp; char zPwd[2000]; if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ - fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20); + fprintf(stderr, "pwd too big: max %d\n", (int)sizeof(zPwd)-20); exit(1); } for(i=1; zPath[i] && zPwd[i]==zPath[i]; i++){} if( zPath[i]==0 ){ blob_reset(pOut);
Modified src/http.c from [54410d4f2b] to [1a73d6f088].
@@ -121,10 +121,11 @@ signal(SIGPIPE, SIG_IGN); #endif return 0; } +#ifdef __MINGW32__ /* ** Read the socket until a newline '\n' is found. Return the number ** of characters read. pSockId contains the socket handel. pOut ** contains a pointer to the buffer to write to. pOutSize contains ** the maximum size of the line that pOut can handle. @@ -167,10 +168,11 @@ } blob_append(pBlob, rbuf, read); } return blob_size(pBlob); } +#endif /* ** Make a single attempt to talk to the server. Return TRUE on success ** and FALSE on a failure. **
Modified src/manifest.c from [134870951b] to [c6998d2022].
@@ -572,10 +572,13 @@ tid = uuid_to_rid(m.aTag[i].zUuid, 1); switch( m.aTag[i].zName[0] ){ case '+': type = 1; break; case '*': type = 2; break; case '-': type = 0; break; + default: + fossil_fatal("unknown tag type in manifest: %s", m.aTag); + return 0; } tag_insert(&m.aTag[i].zName[1], type, m.aTag[i].zValue, rid, m.rDate, tid); } if( parentid ){
Modified src/name.c from [6d9bb622dd] to [8d07e9c5fd].
@@ -99,10 +99,12 @@ rc = 1; }else{ rc = 0; } } + }else{ + rc = 0; } return rc; } /*
Modified src/pivot.c from [2953f62a20] to [55723054d5].
@@ -82,11 +82,11 @@ ** the secondaries. Return its rid. Return 0 if no common ancestor ** can be found. */ int pivot_find(void){ Stmt q1, q2, u1, i1; - int rid; + int rid = 0; /* aqueue must contain at least one primary and one other. Otherwise ** we abort early */ if( db_int(0, "SELECT count(distinct src) FROM aqueue")<2 ){
Modified src/tag.c from [1b7c8db1b9] to [bdc0f633b7].
@@ -232,11 +232,13 @@ zTag = g.argv[2]; switch( zTag[0] ){ case '+': tagtype = 1; break; case '*': tagtype = 2; break; case '-': tagtype = 0; break; - default: fossil_fatal("tag should begin with '+', '*', or '-'"); + default: + fossil_fatal("tag should begin with '+', '*', or '-'"); + return; } rid = name_to_rid(g.argv[3]); if( rid==0 ){ fossil_fatal("no such object: %s", g.argv[3]); }
Modified src/timeline.c from [b24fc763be] to [9aeba121ea].
@@ -396,11 +396,11 @@ */ void print_timeline(Stmt *q, int mxLine){ int nLine = 0; char zPrevDate[20]; char *delims; - const char *zCurrentUuid; + const char *zCurrentUuid=0; Stmt currentQ; int rid = db_lget_int("checkout", 0); zPrevDate[0] = 0; db_prepare(¤tQ,