/ Check-in [110cd84f]
Login

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

Overview
Comment:Fix some harmless compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 110cd84f5e842c4dcd9b9398cea211e25f36b3aa
User & Date: drh 2015-07-15 18:35:54
Context
2015-07-15
21:00
Make the debugging line numbers in the amalgamation more accurate. check-in: 3b34e95c user: mistachkin tags: trunk
19:46
Use a WITHOUT ROWID table to index fts5 btree leaves. This is faster to query and only slightly larger than storing btree nodes within an intkey table. check-in: 862418e3 user: dan tags: fts5-btree-index
18:35
Fix some harmless compiler warnings. check-in: 110cd84f user: drh tags: trunk
18:04
Attempt to fix harmless warnings generated by GCC and Clang runtime analyzers. check-in: b522c95d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wal.c.

  1456   1456       ht_slot *aList;               /* Pointer to sub-list content */
  1457   1457     };
  1458   1458   
  1459   1459     const int nList = *pnList;      /* Size of input list */
  1460   1460     int nMerge = 0;                 /* Number of elements in list aMerge */
  1461   1461     ht_slot *aMerge = 0;            /* List to be merged */
  1462   1462     int iList;                      /* Index into input list */
  1463         -  int iSub = 0;                   /* Index into aSub array */
         1463  +  u32 iSub = 0;                   /* Index into aSub array */
  1464   1464     struct Sublist aSub[13];        /* Array of sub-lists */
  1465   1465   
  1466   1466     memset(aSub, 0, sizeof(aSub));
  1467   1467     assert( nList<=HASHTABLE_NPAGE && nList>0 );
  1468   1468     assert( HASHTABLE_NPAGE==(1<<(ArraySize(aSub)-1)) );
  1469   1469   
  1470   1470     for(iList=0; iList<nList; iList++){
  1471   1471       nMerge = 1;
  1472   1472       aMerge = &aList[iList];
  1473   1473       for(iSub=0; iList & (1<<iSub); iSub++){
  1474         -      struct Sublist *p = &aSub[iSub];
         1474  +      struct Sublist *p;
         1475  +      assert( iSub<ArraySize(aSub) );
         1476  +      p = &aSub[iSub];
  1475   1477         assert( p->aList && p->nList<=(1<<iSub) );
  1476   1478         assert( p->aList==&aList[iList&~((2<<iSub)-1)] );
  1477   1479         walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);
  1478   1480       }
  1479   1481       aSub[iSub].aList = aMerge;
  1480   1482       aSub[iSub].nList = nMerge;
  1481   1483     }
  1482   1484   
  1483   1485     for(iSub++; iSub<ArraySize(aSub); iSub++){
  1484   1486       if( nList & (1<<iSub) ){
  1485         -      struct Sublist *p = &aSub[iSub];
         1487  +      struct Sublist *p;
         1488  +      assert( iSub<ArraySize(aSub) );
         1489  +      p = &aSub[iSub];
  1486   1490         assert( p->nList<=(1<<iSub) );
  1487   1491         assert( p->aList==&aList[nList&~((2<<iSub)-1)] );
  1488   1492         walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);
  1489   1493       }
  1490   1494     }
  1491   1495     assert( aMerge==aList );
  1492   1496     *pnList = nMerge;