On Tuesday 02 Aug 2016 22:07:32 Andy wrote:
> Hi,
> 
> I've attached a very small patch that eliminates a few "unused variable"
> warnings that occur when compiled with various OMIT_* options.
> 
> Cheers,
> Andy

Sorry, this time with inline patch...

Index: src/build.c
==================================================================
--- src/build.c
+++ src/build.c
@@ -2130,11 +2130,13 @@
   Table *pSelTab;   /* A fake table from which we get the result set */
   Select *pSel;     /* Copy of the SELECT that implements the view */
   int nErr = 0;     /* Number of errors encountered */
   int n;            /* Temporarily holds the number of cursors assigned */
   sqlite3 *db = pParse->db;  /* Database connection for malloc errors */
+#ifndef SQLITE_OMIT_AUTHORIZATION
   sqlite3_xauth xAuth;       /* Saved xAuth pointer */
+#endif
 
   assert( pTable );
 
 #ifndef SQLITE_OMIT_VIRTUALTABLE
   if( sqlite3VtabCallConnect(pParse, pTable) ){

Index: src/date.c
==================================================================
--- src/date.c
+++ src/date.c
@@ -1110,11 +1110,10 @@
   int argc,
   sqlite3_value **argv
 ){
   time_t t;
   char *zFormat = (char *)sqlite3_user_data(context);
-  sqlite3 *db;
   sqlite3_int64 iT;
   struct tm *pTm;
   struct tm sNow;
   char zBuf[20];
 

Index: src/resolve.c
==================================================================
--- src/resolve.c
+++ src/resolve.c
@@ -644,11 +644,13 @@
       ExprList *pList = pExpr->x.pList;    /* The argument list */
       int n = pList ? pList->nExpr : 0;    /* Number of arguments */
       int no_such_func = 0;       /* True if no such function exists */
       int wrong_num_args = 0;     /* True if wrong number of arguments */
       int is_agg = 0;             /* True if is an aggregate function */
+#ifndef SQLITE_OMIT_AUTHORIZATION
       int auth;                   /* Authorization to use the function */
+#endif
       int nId;                    /* Number of characters in function name */
       const char *zId;            /* The function name. */
       FuncDef *pDef;              /* Information about the function */
       u8 enc = ENC(pParse->db);   /* The database encoding */
 


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to