UnQL

Check-in [dba083d964]
Login

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

Overview
Comment:Fix compiler warnings. Remove an unused declaration.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dba083d9641184990e5b240c586e0e2c2a46fc24
User & Date: drh 2011-07-16 19:42:22
Context
2011-07-16
20:00
Add support for joins. check-in: 8c6e6a4ed7 user: drh tags: trunk
19:42
Fix compiler warnings. Remove an unused declaration. check-in: dba083d964 user: drh tags: trunk
16:12
Fix problems with arrays and objects with zero members. check-in: 5b31aa5264 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/expr.c.

422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
        }

        case XJD1_STRING: {
          int iIdx;
          if( xjd1JsonToReal(pJRight, &rRight) ) break;
          iIdx = (int)rRight;
          if( (double)iIdx==rRight && iIdx>=0 ){
            char *z = pJLeft->u.z;
            for(z=pJLeft->u.z; *z && iIdx!=0; iIdx--){
              XJD1_SKIP_UTF8(z);
            }
            if( *z ){
              String x;
              char *zEnd = z;
              pRes = xjd1JsonNew(0);
              if( pRes ){
                XJD1_SKIP_UTF8(zEnd);
                xjd1StringInit(&x, 0, 0);
                xjd1StringAppend(&x, z, zEnd-z);
                pRes->eJType = XJD1_STRING;
                pRes->u.z = xjd1StringGet(&x);
              }
            }
          }
          break;
        }







|
|




|




|







422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
        }

        case XJD1_STRING: {
          int iIdx;
          if( xjd1JsonToReal(pJRight, &rRight) ) break;
          iIdx = (int)rRight;
          if( (double)iIdx==rRight && iIdx>=0 ){
            unsigned char *z = (unsigned char*)pJLeft->u.z;
            for(; *z && iIdx!=0; iIdx--){
              XJD1_SKIP_UTF8(z);
            }
            if( *z ){
              String x;
              unsigned char *zEnd = (unsigned char*)z;
              pRes = xjd1JsonNew(0);
              if( pRes ){
                XJD1_SKIP_UTF8(zEnd);
                xjd1StringInit(&x, 0, 0);
                xjd1StringAppend(&x, (char*)z, zEnd-(unsigned char*)z);
                pRes->eJType = XJD1_STRING;
                pRes->u.z = xjd1StringGet(&x);
              }
            }
          }
          break;
        }