aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2019-05-10 16:16:19 +0000
committermistachkin <mistachkin@noemail.net>2019-05-10 16:16:19 +0000
commitd9bc6e8973e9bedadf51bb8fb50f143afdeb497a (patch)
tree1e4d4b8b6306aa7d573ecf947231bf2c4b595283
parent41422656450bed94abee2edf1df83660325afc5c (diff)
downloadsqlite-d9bc6e8973e9bedadf51bb8fb50f143afdeb497a.tar.gz
sqlite-d9bc6e8973e9bedadf51bb8fb50f143afdeb497a.zip
Fix some harmless compiler warnings.
FossilOrigin-Name: ca068d82387fc3cda9d2050cedb4f9c61b6d9dc54f89015b4b2ee492243ed5c9
-rw-r--r--manifest19
-rw-r--r--manifest.uuid2
-rw-r--r--src/whereInt.h4
-rw-r--r--tool/lemon.c74
4 files changed, 53 insertions, 46 deletions
diff --git a/manifest b/manifest
index 0b1618cd6..535ef4f8b 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Ensure\sthat\sthe\sBtShared.nPage\svalue\sis\sreset\scorrectly\son\sa\sSAVEPOINT\s\nROLLBACK.
-D 2019-05-10T14:34:18.772
+C Fix\ssome\sharmless\scompiler\swarnings.
+D 2019-05-10T16:16:19.390
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -608,7 +608,7 @@ F src/wal.c b09a2a9cab50efa08451a8c81d47052120ad5da174048c6d0b08d405384abdf2
F src/wal.h 606292549f5a7be50b6227bd685fa76e3a4affad71bb8ac5ce4cb5c79f6a176a
F src/walker.c 7607f1a68130c028255d8d56094ea602fc402c79e1e35a46e6282849d90d5fe4
F src/where.c 99c7b718ef846ac952016083aaf4e22ede2290beceaf4730a2df55c023251369
-F src/whereInt.h 5f14db426ca46a83eabab1ae9aa6d4b8f27504ad35b64c290916289b1ddb2e88
+F src/whereInt.h 1b728f71654ebf8421a1715497a587f02d6f538e819af58dc826908f8577e810
F src/wherecode.c 37a1004237d630d785c47bba2290eac652a7a8b0047518eba3cb7c808b604c4a
F src/whereexpr.c 4219bdd5d310ba6424166d918efef301c21e1b7f6444e964b415c4a5b877a8fe
F src/window.c 5be2cf7d8763cc97137fc44d015aed8a1a4a56fe9700d7933ed560172617c756
@@ -1744,7 +1744,7 @@ F tool/genfkey.test b6afd7b825d797a1e1274f519ab5695373552ecad5cd373530c63533638a
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
F tool/index_usage.c 9ec344d29cbeb03fdc0fce668eedfb7495792170de933adf95cf8d6904a166ad
F tool/kvtest-speed.sh 4761a9c4b3530907562314d7757995787f7aef8f
-F tool/lemon.c d02a276728c507a7007333944eeabafab1668033794af348389b1166075869ee
+F tool/lemon.c dbcb617f0d815a60c2cb5fedc09ac575af0ba7026b48726c7f80a5a20a5ba345
F tool/lempar.c 61af95b8fac2bfd59c09d55330e78f3f5e352d7aa80bf37404b96ef795be3fdc
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
@@ -1825,7 +1825,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 7e4809eadfe99ebfd797a7c63501421021a720bbeed9fba81bebf630c58bb791
-R 268b58938fd6d4d4d8851725d5098438
-U drh
-Z 721183bcdc81f44fe0374ed072896b4f
+P e6d5fee8cdbdce8515957e8288e4d1e7b06f417fd3f9deeeb636fbf5b995af51
+R 18dbde46f443280c6eecde54f8c54e7b
+T *branch * warnings
+T *sym-warnings *
+T -sym-trunk *
+U mistachkin
+Z b2da933afeced894c61f5f453a40ac1b
diff --git a/manifest.uuid b/manifest.uuid
index 2320774bf..9a7675cc2 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-e6d5fee8cdbdce8515957e8288e4d1e7b06f417fd3f9deeeb636fbf5b995af51 \ No newline at end of file
+ca068d82387fc3cda9d2050cedb4f9c61b6d9dc54f89015b4b2ee492243ed5c9 \ No newline at end of file
diff --git a/src/whereInt.h b/src/whereInt.h
index 07876f435..090bbc287 100644
--- a/src/whereInt.h
+++ b/src/whereInt.h
@@ -14,6 +14,8 @@
** planner logic in "where.c". These definitions are broken out into
** a separate source file for easier editing.
*/
+#ifndef SQLITE_WHEREINT_H
+#define SQLITE_WHEREINT_H
/*
** Trace output macros
@@ -584,3 +586,5 @@ void sqlite3WhereTabFuncArgs(Parse*, struct SrcList_item*, WhereClause*);
#define WHERE_UNQ_WANTED 0x00010000 /* WHERE_ONEROW would have been helpful*/
#define WHERE_PARTIALIDX 0x00020000 /* The automatic index is partial */
#define WHERE_IN_EARLYOUT 0x00040000 /* Perhaps quit IN loops early */
+
+#endif /* !defined(SQLITE_WHEREINT_H) */
diff --git a/tool/lemon.c b/tool/lemon.c
index eb4adbbc6..d92da870d 100644
--- a/tool/lemon.c
+++ b/tool/lemon.c
@@ -483,22 +483,22 @@ void Configtable_clear(int(*)(struct config *));
/* Allocate a new parser action */
static struct action *Action_new(void){
- static struct action *freelist = 0;
+ static struct action *actionfreelist = 0;
struct action *newaction;
- if( freelist==0 ){
+ if( actionfreelist==0 ){
int i;
int amt = 100;
- freelist = (struct action *)calloc(amt, sizeof(struct action));
- if( freelist==0 ){
+ actionfreelist = (struct action *)calloc(amt, sizeof(struct action));
+ if( actionfreelist==0 ){
fprintf(stderr,"Unable to allocate memory for a new parser action.");
exit(1);
}
- for(i=0; i<amt-1; i++) freelist[i].next = &freelist[i+1];
- freelist[amt-1].next = 0;
+ for(i=0; i<amt-1; i++) actionfreelist[i].next = &actionfreelist[i+1];
+ actionfreelist[amt-1].next = 0;
}
- newaction = freelist;
- freelist = freelist->next;
+ newaction = actionfreelist;
+ actionfreelist = actionfreelist->next;
return newaction;
}
@@ -1907,7 +1907,7 @@ static char *msort(
return ep;
}
/************************ From the file "option.c" **************************/
-static char **argv;
+static char **g_argv;
static struct s_options *op;
static FILE *errstream;
@@ -1920,14 +1920,14 @@ static FILE *errstream;
static void errline(int n, int k, FILE *err)
{
int spcnt, i;
- if( argv[0] ) fprintf(err,"%s",argv[0]);
- spcnt = lemonStrlen(argv[0]) + 1;
- for(i=1; i<n && argv[i]; i++){
- fprintf(err," %s",argv[i]);
- spcnt += lemonStrlen(argv[i])+1;
+ if( g_argv[0] ) fprintf(err,"%s",g_argv[0]);
+ spcnt = lemonStrlen(g_argv[0]) + 1;
+ for(i=1; i<n && g_argv[i]; i++){
+ fprintf(err," %s",g_argv[i]);
+ spcnt += lemonStrlen(g_argv[i])+1;
}
spcnt += k;
- for(; argv[i]; i++) fprintf(err," %s",argv[i]);
+ for(; g_argv[i]; i++) fprintf(err," %s",g_argv[i]);
if( spcnt<20 ){
fprintf(err,"\n%*s^-- here\n",spcnt,"");
}else{
@@ -1943,13 +1943,13 @@ static int argindex(int n)
{
int i;
int dashdash = 0;
- if( argv!=0 && *argv!=0 ){
- for(i=1; argv[i]; i++){
- if( dashdash || !ISOPT(argv[i]) ){
+ if( g_argv!=0 && *g_argv!=0 ){
+ for(i=1; g_argv[i]; i++){
+ if( dashdash || !ISOPT(g_argv[i]) ){
if( n==0 ) return i;
n--;
}
- if( strcmp(argv[i],"--")==0 ) dashdash = 1;
+ if( strcmp(g_argv[i],"--")==0 ) dashdash = 1;
}
}
return -1;
@@ -1966,9 +1966,9 @@ static int handleflags(int i, FILE *err)
int errcnt = 0;
int j;
for(j=0; op[j].label; j++){
- if( strncmp(&argv[i][1],op[j].label,lemonStrlen(op[j].label))==0 ) break;
+ if( strncmp(&g_argv[i][1],op[j].label,lemonStrlen(op[j].label))==0 ) break;
}
- v = argv[i][0]=='-' ? 1 : 0;
+ v = g_argv[i][0]=='-' ? 1 : 0;
if( op[j].label==0 ){
if( err ){
fprintf(err,"%sundefined option.\n",emsg);
@@ -1982,7 +1982,7 @@ static int handleflags(int i, FILE *err)
}else if( op[j].type==OPT_FFLAG ){
(*(void(*)(int))(op[j].arg))(v);
}else if( op[j].type==OPT_FSTR ){
- (*(void(*)(char *))(op[j].arg))(&argv[i][2]);
+ (*(void(*)(char *))(op[j].arg))(&g_argv[i][2]);
}else{
if( err ){
fprintf(err,"%smissing argument on switch.\n",emsg);
@@ -2004,11 +2004,11 @@ static int handleswitch(int i, FILE *err)
char *cp;
int j;
int errcnt = 0;
- cp = strchr(argv[i],'=');
+ cp = strchr(g_argv[i],'=');
assert( cp!=0 );
*cp = 0;
for(j=0; op[j].label; j++){
- if( strcmp(argv[i],op[j].label)==0 ) break;
+ if( strcmp(g_argv[i],op[j].label)==0 ) break;
}
*cp = '=';
if( op[j].label==0 ){
@@ -2035,7 +2035,7 @@ static int handleswitch(int i, FILE *err)
if( err ){
fprintf(err,
"%sillegal character in floating-point argument.\n",emsg);
- errline(i,(int)((char*)end-(char*)argv[i]),err);
+ errline(i,(int)((char*)end-(char*)g_argv[i]),err);
}
errcnt++;
}
@@ -2046,7 +2046,7 @@ static int handleswitch(int i, FILE *err)
if( *end ){
if( err ){
fprintf(err,"%sillegal character in integer argument.\n",emsg);
- errline(i,(int)((char*)end-(char*)argv[i]),err);
+ errline(i,(int)((char*)end-(char*)g_argv[i]),err);
}
errcnt++;
}
@@ -2086,15 +2086,15 @@ static int handleswitch(int i, FILE *err)
int OptInit(char **a, struct s_options *o, FILE *err)
{
int errcnt = 0;
- argv = a;
+ g_argv = a;
op = o;
errstream = err;
- if( argv && *argv && op ){
+ if( g_argv && *g_argv && op ){
int i;
- for(i=1; argv[i]; i++){
- if( argv[i][0]=='+' || argv[i][0]=='-' ){
+ for(i=1; g_argv[i]; i++){
+ if( g_argv[i][0]=='+' || g_argv[i][0]=='-' ){
errcnt += handleflags(i,err);
- }else if( strchr(argv[i],'=') ){
+ }else if( strchr(g_argv[i],'=') ){
errcnt += handleswitch(i,err);
}
}
@@ -2111,10 +2111,10 @@ int OptNArgs(void){
int cnt = 0;
int dashdash = 0;
int i;
- if( argv!=0 && argv[0]!=0 ){
- for(i=1; argv[i]; i++){
- if( dashdash || !ISOPT(argv[i]) ) cnt++;
- if( strcmp(argv[i],"--")==0 ) dashdash = 1;
+ if( g_argv!=0 && g_argv[0]!=0 ){
+ for(i=1; g_argv[i]; i++){
+ if( dashdash || !ISOPT(g_argv[i]) ) cnt++;
+ if( strcmp(g_argv[i],"--")==0 ) dashdash = 1;
}
}
return cnt;
@@ -2124,7 +2124,7 @@ char *OptArg(int n)
{
int i;
i = argindex(n);
- return i>=0 ? argv[i] : 0;
+ return i>=0 ? g_argv[i] : 0;
}
void OptErr(int n)
@@ -2728,7 +2728,7 @@ to follow the previous rule.");
case WAITING_FOR_CLASS_ID:
if( !ISLOWER(x[0]) ){
ErrorMsg(psp->filename, psp->tokenlineno,
- "%%token_class must be followed by an identifier: ", x);
+ "%%token_class must be followed by an identifier: %s", x);
psp->errorcnt++;
psp->state = RESYNC_AFTER_DECL_ERROR;
}else if( Symbol_find(x) ){