]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix compiler warnings in lemon by removing some of the code added by
authordrh <drh@noemail.net>
Mon, 20 Jun 2011 18:27:23 +0000 (18:27 +0000)
committerdrh <drh@noemail.net>
Mon, 20 Jun 2011 18:27:23 +0000 (18:27 +0000)
Ryan Gordon in [1e8b842039cc0].

FossilOrigin-Name: 76b18b2be072b9ea242df4c9535059f7b43f564b

manifest
manifest.uuid
tool/lemon.c

index 8f371b541abe8b08c3637bcdb38d63a0686a6a8a..759693be1c299afa363235e2ad9ce12a0f022955 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Rework\sthe\sautoconf\sscript\sto\sbetter\sdeal\swith\sutime()\sand\sdlopen().
-D 2011-06-20T18:00:17.162
+C Fix\scompiler\swarnings\sin\slemon\sby\sremoving\ssome\sof\sthe\scode\sadded\sby\nRyan\sGordon\sin\s[1e8b842039cc0].
+D 2011-06-20T18:27:23.761
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -914,7 +914,7 @@ F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
 F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
 F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
 F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
-F tool/lemon.c 2f182cf58a44a29107ad0027e4e696c79cbb9ad6
+F tool/lemon.c d51c68d405ff7f9bad99268ca3c20a198eb983ed
 F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc
 F tool/mkkeywordhash.c d2e6b4a5965e23afb80fbe74bb54648cd371f309
 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
@@ -946,7 +946,7 @@ F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
 F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings.sh 347d974d143cf132f953b565fbc03026f19fcb4d
-P a4a8402bfec381dd23b7a96c2f4b52c0dd728a7a
-R 16536365517218923dc08762ed8b0c16
+P f69ed286ffb3f62f5cb5c1f7df55fa4d2468b472
+R 85fd773d96f76df373ae8654723885fd
 U drh
-Z f0e3294585f4569580d0a1d0b238c6dc
+Z 8273f766e9b20e2bd5443eed5877e83e
index 998e3d0b0a894162d04fa851ca3d87e3ccbdb5b5..ab322380b7577e3d64d4849a3779742ccb007994 100644 (file)
@@ -1 +1 @@
-f69ed286ffb3f62f5cb5c1f7df55fa4d2468b472
\ No newline at end of file
+76b18b2be072b9ea242df4c9535059f7b43f564b
\ No newline at end of file
index 0a50524854d5f6ae8f84b1892d7a3704fe0775a8..bd2938be258dad5017fc6dfd9b83dd9e86a9c1b4 100644 (file)
@@ -41,23 +41,6 @@ extern int access(const char *path, int mode);
 #endif
 
 static int showPrecedenceConflict = 0;
-static const char **made_files = NULL;
-static int made_files_count = 0;
-static int successful_exit = 0;
-static void LemonAtExit(void)
-{
-    /* if we failed, delete (most) files we made, to unconfuse build tools. */
-    int i;
-    for (i = 0; i < made_files_count; i++) {
-        if (!successful_exit) {
-            remove(made_files[i]);
-        }
-    }
-    free(made_files);
-    made_files_count = 0;
-    made_files = NULL;
-}
-
 static char *msort(char*,char**,int(*)(const char*,const char*));
 
 /*
@@ -1433,8 +1416,6 @@ int main(int argc, char **argv)
   int exitcode;
   struct lemon lem;
 
-  atexit(LemonAtExit);
-
   OptInit(argv,options,stderr);
   if( version ){
      printf("Lemon version 1.0\n");
@@ -1537,7 +1518,6 @@ int main(int argc, char **argv)
 
   /* return 0 on success, 1 on failure. */
   exitcode = ((lem.errorcnt > 0) || (lem.nconflict > 0)) ? 1 : 0;
-  successful_exit = (exitcode == 0);
   exit(exitcode);
   return (exitcode);
 }
@@ -2761,23 +2741,6 @@ PRIVATE FILE *file_open(
     lemp->errorcnt++;
     return 0;
   }
-
-  /* Add files we create to a list, so we can delete them if we fail. This
-  ** is to keep makefiles from getting confused. We don't include .out files,
-  ** though: this is debug information, and you don't want it deleted if there
-  ** was an error you need to track down.
-  */
-  if(( *mode=='w' ) && (strcmp(suffix, ".out") != 0)){
-    const char **ptr = (const char **)
-        realloc(made_files, sizeof (const char **) * (made_files_count + 1));
-    const char *fname = Strsafe(lemp->outname);
-    if ((ptr == NULL) || (fname == NULL)) {
-        free(ptr);
-        memory_error();
-    }
-    made_files = ptr;
-    made_files[made_files_count++] = fname;
-  }
   return fp;
 }