/ Check-in [bed610d9]
Login

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

Overview
Comment:Fix compiler warnings in zipfile.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bed610d99b5322ee209b06966c0086e8c55f8a82be8d7693cfdeb4d728679721
User & Date: drh 2018-01-27 03:26:10
Context
2018-01-27
05:40
Proposed fix for the query planner problem of ticket [ec32177c99ccac2b1]. check-in: eef8cbef user: drh tags: trunk
03:26
Fix compiler warnings in zipfile.c. check-in: bed610d9 user: drh tags: trunk
2018-01-26
22:41
Fix the query planner so that it takes into account dependencies in the arguments to table-valued functions in subexpressions in the WHERE clause. Fix for ticket [80177f0c226ff54f6dd]. check-in: 7daa6873 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/zipfile.c.

   500    500   
   501    501   #define zipfileRead32(aBuf) ( aBuf+=4, zipfileGetU32(aBuf-4) )
   502    502   #define zipfileRead16(aBuf) ( aBuf+=2, zipfileGetU16(aBuf-2) )
   503    503   
   504    504   #define zipfileWrite32(aBuf,val) { zipfilePutU32(aBuf,val); aBuf+=4; }
   505    505   #define zipfileWrite16(aBuf,val) { zipfilePutU16(aBuf,val); aBuf+=2; }
   506    506   
   507         -static u8* zipfileCsrBuffer(ZipfileCsr *pCsr){
   508         -  return ((ZipfileTab*)(pCsr->base.pVtab))->aBuffer;
   509         -}
   510         -
   511    507   /*
   512    508   ** Magic numbers used to read CDS records.
   513    509   */
   514    510   #define ZIPFILE_CDS_FIXED_SZ         46
   515    511   #define ZIPFILE_CDS_NFILE_OFF        28
   516    512   #define ZIPFILE_CDS_SZCOMPRESSED_OFF 20
   517    513   
................................................................................
   645    641     ZipfileEntry **ppEntry
   646    642   ){
   647    643     u8 *aRead;
   648    644     char **pzErr = &pTab->base.zErrMsg;
   649    645     int rc = SQLITE_OK;
   650    646   
   651    647     if( aBlob==0 ){
   652         -    aRead = pTab->aBuffer;
          648  +    aRead = (u8*)pTab->aBuffer;
   653    649       rc = zipfileReadData(pFile, aRead, ZIPFILE_CDS_FIXED_SZ, iOff, pzErr);
   654    650     }else{
   655    651       aRead = (u8*)&aBlob[iOff];
   656    652     }
   657    653   
   658    654     if( rc==SQLITE_OK ){
   659    655       int nAlloc;
................................................................................
   699    695   
   700    696       if( rc==SQLITE_OK ){
   701    697         static const int szFix = ZIPFILE_LFH_FIXED_SZ;
   702    698         ZipfileLFH lfh;
   703    699         if( pFile ){
   704    700           rc = zipfileReadData(pFile, aRead, szFix, pNew->cds.iOffset, pzErr);
   705    701         }else{
   706         -        aRead = &aBlob[pNew->cds.iOffset];
          702  +        aRead = (u8*)&aBlob[pNew->cds.iOffset];
   707    703         }
   708    704   
   709    705         rc = zipfileReadLFH(aRead, &lfh);
   710    706         if( rc==SQLITE_OK ){
   711    707           pNew->iDataOff =  pNew->cds.iOffset + ZIPFILE_LFH_FIXED_SZ;
   712    708           pNew->iDataOff += lfh.nFile + lfh.nExtra;
   713    709           if( aBlob && pNew->cds.szCompressed ){