/ Check-in [5192f964]
Login

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

Overview
Comment:Fix harmless warnings on 32-bit MSVC builds.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5192f964b2a85459553f1cea741b9791606ccc4e
User & Date: drh 2014-09-18 02:20:54
Context
2014-09-18
09:59
Modify an assert() within sqlite3PagerWalFramesize(), a function only ever used by zipvfs, to account for recent zipvfs changes. check-in: 3bd7c1b2 user: dan tags: trunk
02:20
Fix harmless warnings on 32-bit MSVC builds. check-in: 5192f964 user: drh tags: trunk
01:50
Make sure of the strchrnul() library function on platforms where it is available. check-in: ef1aa10b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/malloc.c.

   595    595   
   596    596   /*
   597    597   ** Allocate and zero memory.
   598    598   */ 
   599    599   void *sqlite3MallocZero(u64 n){
   600    600     void *p = sqlite3Malloc(n);
   601    601     if( p ){
   602         -    memset(p, 0, n);
          602  +    memset(p, 0, (size_t)n);
   603    603     }
   604    604     return p;
   605    605   }
   606    606   
   607    607   /*
   608    608   ** Allocate and zero memory.  If the allocation fails, make
   609    609   ** the mallocFailed flag in the connection pointer.
   610    610   */
   611    611   void *sqlite3DbMallocZero(sqlite3 *db, u64 n){
   612    612     void *p = sqlite3DbMallocRaw(db, n);
   613    613     if( p ){
   614         -    memset(p, 0, n);
          614  +    memset(p, 0, (size_t)n);
   615    615     }
   616    616     return p;
   617    617   }
   618    618   
   619    619   /*
   620    620   ** Allocate and zero memory.  If the allocation fails, make
   621    621   ** the mallocFailed flag in the connection pointer.
................................................................................
   749    749     char *zNew;
   750    750     if( z==0 ){
   751    751       return 0;
   752    752     }
   753    753     assert( (n&0x7fffffff)==n );
   754    754     zNew = sqlite3DbMallocRaw(db, n+1);
   755    755     if( zNew ){
   756         -    memcpy(zNew, z, n);
          756  +    memcpy(zNew, z, (size_t)n);
   757    757       zNew[n] = 0;
   758    758     }
   759    759     return zNew;
   760    760   }
   761    761   
   762    762   /*
   763    763   ** Create a string from the zFromat argument and the va_list that follows.