/ Check-in [b1824344]
Login

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

Overview
Comment:Use an unsigned integer to accumulate the string hash. Avoids compiler warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b1824344ea4918a13abbda4a3b7134d35fd867c4
User & Date: drh 2014-01-24 16:36:18
Context
2014-01-24
16:57
Add test cases for LIMIT and ORDER BY on recursive CTEs. check-in: 67d6c42d user: dan tags: trunk
16:36
Use an unsigned integer to accumulate the string hash. Avoids compiler warnings. check-in: b1824344 user: drh tags: trunk
15:42
Add a few more CTE test cases to closure.test. check-in: 1b6405d9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/hash.c.

    49     49     pH->count = 0;
    50     50   }
    51     51   
    52     52   /*
    53     53   ** The hashing function.
    54     54   */
    55     55   static unsigned int strHash(const char *z, int nKey){
    56         -  int h = 0;
           56  +  unsigned int h = 0;
    57     57     assert( nKey>=0 );
    58     58     while( nKey > 0  ){
    59     59       h = (h<<3) ^ h ^ sqlite3UpperToLower[(unsigned char)*z++];
    60     60       nKey--;
    61     61     }
    62     62     return h;
    63     63   }