/ Check-in [1916d291]
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 the CLI.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1916d2912a4ef5c251853de3c9d66417e20f0c0fc8ddfbc84c131dfd798439f6
User & Date: drh 2018-10-11 16:53:37
Context
2018-10-11
18:41
Add the textkey and textrekey pragmas. check-in: f03164d4 user: drh tags: trunk
17:05
Merge compiler warning fixes and the codec enhancement from trunk. check-in: f9fa58e1 user: drh tags: apple-osx
16:53
Fix harmless compiler warnings in the CLI. check-in: 1916d291 user: drh tags: trunk
16:38
Always reset the pager before changing the codec. check-in: 0bf0fd24 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

  3502   3502   ** zPattern describes the set of commands for which help text is provided.
  3503   3503   ** If zPattern is NULL, then show all commands, but only give a one-line
  3504   3504   ** description of each.
  3505   3505   **
  3506   3506   ** Return the number of matches.
  3507   3507   */
  3508   3508   static int showHelp(FILE *out, const char *zPattern){
  3509         -  int i, j;
         3509  +  int i = 0;
         3510  +  int j = 0;
  3510   3511     int n = 0;
  3511   3512     char *zPat;
  3512   3513     if( zPattern==0
  3513   3514      || zPattern[0]=='0'
  3514   3515      || strcmp(zPattern,"-a")==0
  3515   3516      || strcmp(zPattern,"-all")==0
  3516   3517     ){
................................................................................
  6165   6166         raw_printf(stderr, "Usage: .headers on|off\n");
  6166   6167         rc = 1;
  6167   6168       }
  6168   6169     }else
  6169   6170   
  6170   6171     if( c=='h' && strncmp(azArg[0], "help", n)==0 ){
  6171   6172       if( nArg>=2 ){
  6172         -      int n = showHelp(p->out, azArg[1]);
         6173  +      n = showHelp(p->out, azArg[1]);
  6173   6174         if( n==0 ){
  6174   6175           utf8_printf(p->out, "Nothing matches '%s'\n", azArg[1]);
  6175   6176         }
  6176   6177       }else{
  6177   6178         showHelp(p->out, 0);
  6178   6179       }
  6179   6180     }else