Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Get rid of the following compile-time warnings: tool/mkkeywordhash.c:353: warning: array subscript has type 'char' tool/mkkeywordhash.c:354: warning: array subscript has type 'char' (CVS 4189) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c01d7944799d8a96a29f8d4f6d2bb7c4 |
User & Date: | rse 2007-07-30 18:26:20.000 |
Context
2007-07-30
| ||
18:31 | "extern" declarations inside function bodies are not every compiler's favorite, so move to global scope. Additionally, at least under Unix environment use <unistd.h> to get the proper prototype instead of using a K&R-style own declaration. (CVS 4190) (check-in: 5955a77d6c user: rse tags: trunk) | |
18:26 | Get rid of the following compile-time warnings: tool/mkkeywordhash.c:353: warning: array subscript has type 'char' tool/mkkeywordhash.c:354: warning: array subscript has type 'char' (CVS 4189) (check-in: c01d794479 user: rse tags: trunk) | |
18:24 | Get rid of the following compile-time warning: "src/shell.c:112: warning: 'iotracePrintf' defined but not used" (CVS 4188) (check-in: 271e27fd30 user: rse tags: trunk) | |
Changes
Changes to tool/mkkeywordhash.c.
︙ | ︙ | |||
11 12 13 14 15 16 17 | ** A header comment placed at the beginning of generated code. */ static const char zHdr[] = "/***** This file contains automatically generated code ******\n" "**\n" "** The code in this file has been automatically generated by\n" "**\n" | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ** A header comment placed at the beginning of generated code. */ static const char zHdr[] = "/***** This file contains automatically generated code ******\n" "**\n" "** The code in this file has been automatically generated by\n" "**\n" "** $Header: /home/drh/sqlite/trans/cvs/sqlite/sqlite/tool/mkkeywordhash.c,v 1.31 2007/07/30 18:26:20 rse Exp $\n" "**\n" "** The code in this file implements a function that determines whether\n" "** or not a given identifier is really an SQL keyword. The same thing\n" "** might be implemented more directly using a hand-written hash table.\n" "** But by using this automatically generated code, the size of the code\n" "** is substantially reduced. This is important for embedded applications\n" "** on platforms with limited memory.\n" |
︙ | ︙ | |||
346 347 348 349 350 351 352 | nKeyword = j; /* Fill in the lengths of strings and hashes for all entries. */ for(i=0; i<nKeyword; i++){ Keyword *p = &aKeywordTable[i]; p->len = strlen(p->zName); totalLen += p->len; | | | | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | nKeyword = j; /* Fill in the lengths of strings and hashes for all entries. */ for(i=0; i<nKeyword; i++){ Keyword *p = &aKeywordTable[i]; p->len = strlen(p->zName); totalLen += p->len; p->hash = (UpperToLower[(int)p->zName[0]]*4) ^ (UpperToLower[(int)p->zName[p->len-1]]*3) ^ p->len; p->id = i+1; } /* Sort the table from shortest to longest keyword */ qsort(aKeywordTable, nKeyword, sizeof(aKeywordTable[0]), keywordCompare1); /* Look for short keywords embedded in longer keywords */ |
︙ | ︙ |