/ Check-in [a1f53252]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Always cast 0 to (char*)0 when it is an argument in a varargs function. (CVS 1948)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a1f532520c16a1f4b4285cd522774669292fb234
User & Date: drh 2004-09-08 15:09:41
Context
2004-09-08
20:13
More changes directed at getting things to work on 64-bit platforms. (CVS 1949) check-in: 39755d21 user: drh tags: trunk
15:09
Always cast 0 to (char*)0 when it is an argument in a varargs function. (CVS 1948) check-in: a1f53252 user: drh tags: trunk
13:07
Add new APIs to sqlite3.def: sqlite3_bind_parameter_name and sqlite3_bind_parameter_index. (CVS 1947) check-in: ff256fb5 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

    19     19   **     DROP INDEX
    20     20   **     creating ID lists
    21     21   **     BEGIN TRANSACTION
    22     22   **     COMMIT
    23     23   **     ROLLBACK
    24     24   **     PRAGMA
    25     25   **
    26         -** $Id: build.c,v 1.251 2004/09/06 17:24:12 drh Exp $
           26  +** $Id: build.c,v 1.252 2004/09/08 15:09:41 drh Exp $
    27     27   */
    28     28   #include "sqliteInt.h"
    29     29   #include <ctype.h>
    30     30   
    31     31   /*
    32     32   ** This routine is called when a new SQL statement is beginning to
    33     33   ** be parsed.  Check to see if the schema for the database needs
................................................................................
   781    781     Column *pCol;
   782    782     if( (p = pParse->pNewTable)==0 ) return;
   783    783     i = p->nCol-1;
   784    784     if( i<0 ) return;
   785    785     pCol = &p->aCol[i];
   786    786     pz = &pCol->zType;
   787    787     n = pLast->n + Addr(pLast->z) - Addr(pFirst->z);
   788         -  sqlite3SetNString(pz, pFirst->z, n, 0);
          788  +  sqlite3SetNString(pz, pFirst->z, n, (char*)0);
   789    789     z = *pz;
   790    790     if( z==0 ) return;
   791    791     for(i=j=0; z[i]; i++){
   792    792       int c = z[i];
   793    793       if( isspace(c) ) continue;
   794    794       z[j++] = c;
   795    795     }
................................................................................
   810    810     int i;
   811    811     char **pz;
   812    812     if( (p = pParse->pNewTable)==0 ) return;
   813    813     i = p->nCol-1;
   814    814     if( i<0 ) return;
   815    815     pz = &p->aCol[i].zDflt;
   816    816     if( minusFlag ){
   817         -    sqlite3SetNString(pz, "-", 1, pVal->z, pVal->n, 0);
          817  +    sqlite3SetNString(pz, "-", 1, pVal->z, pVal->n, (char*)0);
   818    818     }else{
   819         -    sqlite3SetNString(pz, pVal->z, pVal->n, 0);
          819  +    sqlite3SetNString(pz, pVal->z, pVal->n, (char*)0);
   820    820     }
   821    821     sqlite3Dequote(*pz);
   822    822   }
   823    823   
   824    824   /*
   825    825   ** Designate the PRIMARY KEY for the table.  pList is a list of names 
   826    826   ** of columns that form the primary key.  If pList is NULL, then the
................................................................................
  1013   1013       if( pColl2->xCmp!=0 ){
  1014   1014         memcpy(pColl, pColl2, sizeof(CollSeq));
  1015   1015         return SQLITE_OK;
  1016   1016       }
  1017   1017     }
  1018   1018     if( pParse->nErr==0 ){
  1019   1019       sqlite3SetNString(&pParse->zErrMsg, "no such collation sequence: ", 
  1020         -        -1, z, n, 0);
         1020  +        -1, z, n, (char*)0);
  1021   1021     }
  1022   1022     pParse->nErr++;
  1023   1023     return SQLITE_ERROR;
  1024   1024   }
  1025   1025   
  1026   1026   /*
  1027   1027   ** This routine is called on a collation sequence before it is used to
................................................................................
  1098   1098       }
  1099   1099     }
  1100   1100   
  1101   1101     /* If nothing has been found, write the error message into pParse */
  1102   1102     if( !initbusy && (!pColl || !pColl->xCmp) ){
  1103   1103       if( pParse->nErr==0 ){
  1104   1104         sqlite3SetNString(&pParse->zErrMsg, "no such collation sequence: ", -1,
  1105         -          zName, nName, 0);
         1105  +          zName, nName, (char*)0);
  1106   1106       }
  1107   1107       pParse->nErr++;
  1108   1108       pColl = 0;
  1109   1109     }
  1110   1110     return pColl;
  1111   1111   }
  1112   1112   

Changes to src/pragma.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used to implement the PRAGMA command.
    13     13   **
    14         -** $Id: pragma.c,v 1.64 2004/09/06 17:24:13 drh Exp $
           14  +** $Id: pragma.c,v 1.65 2004/09/08 15:09:41 drh Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   #include <ctype.h>
    18     18   
    19     19   #if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
    20     20   # include "pager.h"
    21     21   # include "btree.h"
................................................................................
   204    204     if( iDb<0 ) return;
   205    205     pDb = &db->aDb[iDb];
   206    206   
   207    207     zLeft = sqlite3NameFromToken(pId);
   208    208     if( !zLeft ) return;
   209    209     if( minusFlag ){
   210    210       zRight = 0;
   211         -    sqlite3SetNString(&zRight, "-", 1, pValue->z, pValue->n, 0);
          211  +    sqlite3SetNString(&zRight, "-", 1, pValue->z, pValue->n, (char*)0);
   212    212     }else{
   213    213       zRight = sqlite3NameFromToken(pValue);
   214    214     }
   215    215   
   216    216     zDb = ((iDb>0)?pDb->zName:0);
   217    217     if( sqlite3AuthCheck(pParse, SQLITE_PRAGMA, zLeft, zRight, zDb) ){
   218    218       goto pragma_out;

Changes to src/select.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains C code routines that are called by the parser
    13     13   ** to handle SELECT statements in SQLite.
    14     14   **
    15         -** $Id: select.c,v 1.207 2004/09/06 17:24:13 drh Exp $
           15  +** $Id: select.c,v 1.208 2004/09/08 15:09:41 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   
    20     20   /*
    21     21   ** Allocate a new Select structure and return a pointer to that
    22     22   ** structure.
................................................................................
   117    117        (jointype & JT_ERROR)!=0
   118    118     ){
   119    119       static Token dummy = { 0, 0 };
   120    120       char *zSp1 = " ", *zSp2 = " ";
   121    121       if( pB==0 ){ pB = &dummy; zSp1 = 0; }
   122    122       if( pC==0 ){ pC = &dummy; zSp2 = 0; }
   123    123       sqlite3SetNString(&pParse->zErrMsg, "unknown or unsupported join type: ", 0,
   124         -       pA->z, pA->n, zSp1, 1, pB->z, pB->n, zSp2, 1, pC->z, pC->n, 0);
          124  +       pA->z, pA->n, zSp1, 1, pB->z, pB->n, zSp2, 1, pC->z, pC->n, (char*)0);
   125    125       pParse->nErr++;
   126    126       jointype = JT_INNER;
   127    127     }else if( jointype & JT_RIGHT ){
   128    128       sqlite3ErrorMsg(pParse, 
   129    129         "RIGHT and FULL OUTER JOINs are not currently supported");
   130    130       jointype = JT_INNER;
   131    131     }

Changes to src/tokenize.c.

    11     11   *************************************************************************
    12     12   ** An tokenizer for SQL
    13     13   **
    14     14   ** This file contains C code that splits an SQL input string up into
    15     15   ** individual tokens and sends those tokens one-by-one over to the
    16     16   ** parser for analysis.
    17     17   **
    18         -** $Id: tokenize.c,v 1.86 2004/09/07 16:19:54 drh Exp $
           18  +** $Id: tokenize.c,v 1.87 2004/09/08 15:09:41 drh Exp $
    19     19   */
    20     20   #include "sqliteInt.h"
    21     21   #include "os.h"
    22     22   #include <ctype.h>
    23     23   #include <stdlib.h>
    24     24   
    25     25   /*
................................................................................
   497    497             sqlite3SetString(pzErrMsg, "interrupt", (char*)0);
   498    498             goto abort_parse;
   499    499           }
   500    500           break;
   501    501         }
   502    502         case TK_ILLEGAL: {
   503    503           sqlite3SetNString(pzErrMsg, "unrecognized token: \"", -1, 
   504         -           pParse->sLastToken.z, pParse->sLastToken.n, "\"", 1, 0);
          504  +           pParse->sLastToken.z, pParse->sLastToken.n, "\"", 1, (char*)0);
   505    505           nErr++;
   506    506           goto abort_parse;
   507    507         }
   508    508         case TK_SEMI: {
   509    509           pParse->zTail = &zSql[i];
   510    510           /* Fall thru into the default case */
   511    511         }

Changes to src/vdbeaux.c.

   295    295     }else if( n==P3_KEYINFO_HANDOFF ){
   296    296       pOp->p3 = (char*)zP3;
   297    297       pOp->p3type = P3_KEYINFO;
   298    298     }else if( n<0 ){
   299    299       pOp->p3 = (char*)zP3;
   300    300       pOp->p3type = n;
   301    301     }else{
   302         -    sqlite3SetNString(&pOp->p3, zP3, n, 0);
          302  +    sqlite3SetNString(&pOp->p3, zP3, n, (char*)0);
   303    303       pOp->p3type = P3_DYNAMIC;
   304    304     }
   305    305   }
   306    306   
   307    307   /*
   308    308   ** If the P3 operand to the specified instruction appears
   309    309   ** to be a quoted string token, then this procedure removes