SQLite

Check-in [bc93e17924]
Login

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

Overview
Comment:Fix harmless compiler warnings.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bc93e17924f732468282c5e7a483811d27af573a47aec8ba806f4fe3c5919893
User & Date: drh 2024-11-04 19:18:19.862
Context
2024-11-04
20:16
Fix the percentile extension so that works as an independent extension. Forum post ab25469a350e0488 (check-in: 27b829c344 user: drh tags: trunk)
19:18
Fix harmless compiler warnings. (check-in: bc93e17924 user: drh tags: trunk)
19:08
Ensure that the database encoding is detected before the code generator gets too far down into byte-code generation and execution, but not so early that it interferes with initialization. Forum thread bc75a4d20b756044. (check-in: af7173a10e user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/fts5/fts5_tcl.c.
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
/*
** Implementation of str().
*/
void f5tStrFunc(sqlite3_context *pCtx, int nArg, sqlite3_value **apArg){
  const char *zText = 0;
  assert( nArg==1 );

  zText = sqlite3_value_text(apArg[0]);
  if( zText ){
    sqlite3_int64 nText = strlen(zText);
    char *zCopy = (char*)ckalloc(nText+8);
    if( zCopy==0 ){
      sqlite3_result_error_nomem(pCtx);
    }else{
      zCopy += 8;







|







1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
/*
** Implementation of str().
*/
void f5tStrFunc(sqlite3_context *pCtx, int nArg, sqlite3_value **apArg){
  const char *zText = 0;
  assert( nArg==1 );

  zText = (const char*)sqlite3_value_text(apArg[0]);
  if( zText ){
    sqlite3_int64 nText = strlen(zText);
    char *zCopy = (char*)ckalloc(nText+8);
    if( zCopy==0 ){
      sqlite3_result_error_nomem(pCtx);
    }else{
      zCopy += 8;
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
static int SQLITE_TCLAPI f5tRegisterStr(
  void * clientData,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *CONST objv[]
){
  sqlite3 *db = 0;
  int rc;

  if( objc!=2 ){
    Tcl_WrongNumArgs(interp, 1, objv, "DB");
    return TCL_ERROR;
  }
  if( f5tDbPointer(interp, objv[1], &db) ){
    return TCL_ERROR;







<







1666
1667
1668
1669
1670
1671
1672

1673
1674
1675
1676
1677
1678
1679
static int SQLITE_TCLAPI f5tRegisterStr(
  void * clientData,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *CONST objv[]
){
  sqlite3 *db = 0;


  if( objc!=2 ){
    Tcl_WrongNumArgs(interp, 1, objv, "DB");
    return TCL_ERROR;
  }
  if( f5tDbPointer(interp, objv[1], &db) ){
    return TCL_ERROR;
Changes to src/test1.c.
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
  extern int sqlite3_current_time;
#if SQLITE_OS_UNIX && defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  extern int sqlite3_hostid_num;
#endif
  extern int sqlite3_max_blobsize;
  extern int SQLITE_TCLAPI sqlite3BtreeSharedCacheReport(void*,
                                          Tcl_Interp*,int,Tcl_Obj*CONST*);
  static int iZero = 0;
  static struct {
     char *zName;
     Tcl_CmdProc *xProc;
  } aCmd[] = {
     { "db_enter",                      (Tcl_CmdProc*)db_enter               },
     { "db_leave",                      (Tcl_CmdProc*)db_leave               },
     { "sqlite3_mprintf_int",           (Tcl_CmdProc*)sqlite3_mprintf_int    },







<







8792
8793
8794
8795
8796
8797
8798

8799
8800
8801
8802
8803
8804
8805
  extern int sqlite3_current_time;
#if SQLITE_OS_UNIX && defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  extern int sqlite3_hostid_num;
#endif
  extern int sqlite3_max_blobsize;
  extern int SQLITE_TCLAPI sqlite3BtreeSharedCacheReport(void*,
                                          Tcl_Interp*,int,Tcl_Obj*CONST*);

  static struct {
     char *zName;
     Tcl_CmdProc *xProc;
  } aCmd[] = {
     { "db_enter",                      (Tcl_CmdProc*)db_enter               },
     { "db_leave",                      (Tcl_CmdProc*)db_leave               },
     { "sqlite3_mprintf_int",           (Tcl_CmdProc*)sqlite3_mprintf_int    },