Check-in [cd965de682]
Not logged in
Overview

SHA1 Hash:cd965de68208d3314fa31b24441f475abd3d4216
Date: 2009-01-24 10:44:43
User: drh
Comment:Fix some compiler warnings.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/cgi.c from [9bee6fb4ef] to [ebad09218e].

@@ -1187,11 +1187,11 @@
 int cgi_http_server(int mnPort, int mxPort, char *zBrowser){
 #ifdef __MINGW32__
   /* Use win32_http_server() instead */
   exit(1);
 #else
-  int listener;                /* The server socket */
+  int listener = -1;           /* The server socket */
   int connection;              /* A socket for each individual connection */
   fd_set readfds;              /* Set of file descriptors for select() */
   size_t lenaddr;              /* Length of the inaddr structure */
   int child;                   /* PID of the child process */
   int nchildren = 0;           /* Number of child processes */

Modified src/report.c from [99dd85042a] to [79992110fa].

@@ -615,10 +615,11 @@
   @  FROM ticket
   @ </pre></blockquote>
   @
 }
 
+#if 0 /* NOT USED */
 static void column_header(int rn,const char *zCol, int nCol, int nSorted,
     const char *zDirection, const char *zExtra
 ){
   int set = (nCol==nSorted);
   int desc = !strcmp(zDirection,"DESC");
@@ -641,10 +642,11 @@
     @ href="rptview?rn=%d(rn)&amp;order_by=%d(nCol)&amp;\
     @ order_dir=%s(desc?"ASC":"DESC")\
     @ %s(zExtra)">%h(zCol)</a></th>
   }
 }
+#endif
 
 /*
 ** The state of the report generation.
 */
 struct GenerateHTML {

Modified src/rss.c from [07391be604] to [4b2fa7b7d6].

@@ -49,11 +49,10 @@
   Stmt q;
   int nLine=0;
   char *zPubDate, *zProjectName, *zProjectDescr, *zFreeProjectName=0;
   Blob bSQL;
   const char *zType = PD("y","all"); /* Type of events.  All if NULL */
-  blob_zero(&bSQL);
   const char zSQL1[] =
     @ SELECT
     @   blob.rid,
     @   uuid,
     @   datetime(event.mtime),
@@ -62,10 +61,11 @@
     @   (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim),
     @   (SELECT count(*) FROM plink WHERE cid=blob.rid)
     @ FROM event, blob
     @ WHERE blob.rid=event.objid
   ;
+  blob_zero(&bSQL);
   blob_append( &bSQL, zSQL1, -1 );
 
   if( zType[0]!='a' ){
       blob_appendf(&bSQL, " AND event.type=%Q", zType);
   }

Modified src/th.c from [05228f97bf] to [ca17d87687].

@@ -1814,11 +1814,11 @@
 
   if( pExpr->pOp==0 ){
     /* A literal */
     rc = thSubstWord(interp, pExpr->zValue, pExpr->nValue);
   }else{
-    int eArgType;           /* Actual type of arguments */
+    int eArgType = 0;           /* Actual type of arguments */
 
     /* Argument values */
     int iLeft;
     int iRight;
     double fLeft;
@@ -1864,11 +1864,11 @@
         }
       }
     }
 
     if( rc==TH_OK && eArgType==ARG_INTEGER ){
-      int iRes;
+      int iRes = 0;
       switch( pExpr->pOp->eOp ) {
         case OP_MULTIPLY:     iRes = iLeft*iRight;  break;
         case OP_DIVIDE:       iRes = iLeft/iRight;  break;
         case OP_MODULUS:      iRes = iLeft%iRight;  break;
         case OP_ADD:          iRes = iLeft+iRight;  break;

Modified src/th_lang.c from [8af8d7380e] to [2c954f31ba].

@@ -651,11 +651,11 @@
   const char *zNeedle;
   int nNeedle;
   const char *zHaystack;
   int nHaystack;
   int i;
-  int iRes;
+  int iRes = -1;
 
   if( argc!=4 ){
     return Th_WrongNumArgs(interp, "string first needle haystack");
   }
 
@@ -712,11 +712,11 @@
   const char *zNeedle;
   int nNeedle;
   const char *zHaystack;
   int nHaystack;
   int i;
-  int iRes;
+  int iRes = -1;
 
   if( argc!=4 ){
     return Th_WrongNumArgs(interp, "string first needle haystack");
   }