/ Check-in [6b9877fa]
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:Initialize a variable introduced as part of the fix for [bd484a090c8077] in order to silence a compiler warning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6b9877fa43bf29a9740285f0c40a6e6cf21f8190
User & Date: dan 2011-06-21 15:38:05
Context
2011-06-21
15:54
Give the osLocaltime() function file scope in date.c. check-in: 15774845 user: drh tags: trunk
15:38
Initialize a variable introduced as part of the fix for [bd484a090c8077] in order to silence a compiler warning. check-in: 6b9877fa user: dan tags: trunk
15:27
Add a missing initializer for sqlite3GlobalConfig.bLocaltimeFault. check-in: 7fe8ba2e user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/date.c.

464
465
466
467
468
469
470



471
472
473
474
475
476
477
  DateTime *p,                    /* Date at which to calculate offset */
  sqlite3_context *pCtx,          /* Write error here if one occurs */
  int *pRc                        /* OUT: Error code. SQLITE_OK or ERROR */
){
  DateTime x, y;
  time_t t;
  struct tm sLocal;




  x = *p;
  computeYMD_HMS(&x);
  if( x.Y<1971 || x.Y>=2038 ){
    x.Y = 2000;
    x.M = 1;
    x.D = 1;







>
>
>







464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
  DateTime *p,                    /* Date at which to calculate offset */
  sqlite3_context *pCtx,          /* Write error here if one occurs */
  int *pRc                        /* OUT: Error code. SQLITE_OK or ERROR */
){
  DateTime x, y;
  time_t t;
  struct tm sLocal;

  /* Initialize the contents of sLocal to avoid a compiler warning. */
  memset(&sLocal, 0, sizeof(sLocal));

  x = *p;
  computeYMD_HMS(&x);
  if( x.Y<1971 || x.Y>=2038 ){
    x.Y = 2000;
    x.M = 1;
    x.D = 1;