/ Check-in [a12d214e]
Login

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

Overview
Comment:Fix harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | memTests
Files: files | file ages | folders
SHA1: a12d214ecccc5d3372dbcedc88705b0092363971
User & Date: mistachkin 2013-12-03 22:33:35
Context
2013-12-03
23:33
Make use of the CC nmake macro even when cross-compiling (with MSVC). Closed-Leaf check-in: aae7b30e user: mistachkin tags: memTests
22:33
Fix harmless compiler warnings. check-in: a12d214e user: mistachkin tags: memTests
22:32
Add memory subsystem related defines to the compile-time options list. check-in: 52a44146 user: mistachkin tags: memTests
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mem5.c.

   198    198   ** Return the size of an outstanding allocation, in bytes.  The
   199    199   ** size returned omits the 8-byte header overhead.  This only
   200    200   ** works for chunks that are currently checked out.
   201    201   */
   202    202   static int memsys5Size(void *p){
   203    203     int iSize = 0;
   204    204     if( p ){
   205         -    int i = ((u8 *)p-mem5.zPool)/mem5.szAtom;
          205  +    int i = (int)(((u8 *)p-mem5.zPool)/mem5.szAtom);
   206    206       assert( i>=0 && i<mem5.nBlock );
   207    207       iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE));
   208    208     }
   209    209     return iSize;
   210    210   }
   211    211   
   212    212   /*
................................................................................
   285    285   static void memsys5FreeUnsafe(void *pOld){
   286    286     u32 size, iLogsize;
   287    287     int iBlock;
   288    288   
   289    289     /* Set iBlock to the index of the block pointed to by pOld in 
   290    290     ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool.
   291    291     */
   292         -  iBlock = ((u8 *)pOld-mem5.zPool)/mem5.szAtom;
          292  +  iBlock = (int)(((u8 *)pOld-mem5.zPool)/mem5.szAtom);
   293    293   
   294    294     /* Check that the pointer pOld points to a valid, non-free block. */
   295    295     assert( iBlock>=0 && iBlock<mem5.nBlock );
   296    296     assert( ((u8 *)pOld-mem5.zPool)%mem5.szAtom==0 );
   297    297     assert( (mem5.aCtrl[iBlock] & CTRL_FREE)==0 );
   298    298   
   299    299     iLogsize = mem5.aCtrl[iBlock] & CTRL_LOGSIZE;