/ Check-in [bbe7dcda]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix harmless compiler warnings in lemon.c
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bbe7dcda689a25860f2104804f00ba0a720c1372
User & Date: drh 2015-03-31 15:15:48
Context
2015-03-31
16:33
Handle very large URI pathnames for in-memory shared-cache databases. check-in: 586a94e8 user: drh tags: trunk
15:15
Fix harmless compiler warnings in lemon.c check-in: bbe7dcda user: drh tags: trunk
14:31
Fix the corruptJ.test case so that it works with and without SQLITE_SECURE_DELETE. check-in: 0c0ecfd6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/lemon.c.

  1727   1727     char **next,
  1728   1728     int (*cmp)(const char*,const char*)
  1729   1729   ){
  1730   1730     unsigned long offset;
  1731   1731     char *ep;
  1732   1732     char *set[LISTSIZE];
  1733   1733     int i;
  1734         -  offset = (unsigned long)next - (unsigned long)list;
         1734  +  offset = (unsigned long)((char*)next - (char*)list);
  1735   1735     for(i=0; i<LISTSIZE; i++) set[i] = 0;
  1736   1736     while( list ){
  1737   1737       ep = list;
  1738   1738       list = NEXT(list);
  1739   1739       NEXT(ep) = 0;
  1740   1740       for(i=0; i<LISTSIZE-1 && set[i]!=0; i++){
  1741   1741         ep = merge(ep,set[i],cmp,offset);
................................................................................
  1871   1871           break;
  1872   1872         case OPT_DBL:
  1873   1873         case OPT_FDBL:
  1874   1874           dv = strtod(cp,&end);
  1875   1875           if( *end ){
  1876   1876             if( err ){
  1877   1877               fprintf(err,"%sillegal character in floating-point argument.\n",emsg);
  1878         -            errline(i,((unsigned long)end)-(unsigned long)argv[i],err);
         1878  +            errline(i,(int)((char*)end-(char*)argv[i]),err);
  1879   1879             }
  1880   1880             errcnt++;
  1881   1881           }
  1882   1882           break;
  1883   1883         case OPT_INT:
  1884   1884         case OPT_FINT:
  1885   1885           lv = strtol(cp,&end,0);
  1886   1886           if( *end ){
  1887   1887             if( err ){
  1888   1888               fprintf(err,"%sillegal character in integer argument.\n",emsg);
  1889         -            errline(i,((unsigned long)end)-(unsigned long)argv[i],err);
         1889  +            errline(i,(int)((char*)end-(char*)argv[i]),err);
  1890   1890             }
  1891   1891             errcnt++;
  1892   1892           }
  1893   1893           break;
  1894   1894         case OPT_STR:
  1895   1895         case OPT_FSTR:
  1896   1896           sv = cp;