From: drh Date: Tue, 6 Aug 2013 18:35:31 +0000 (+0000) Subject: Adjust #ifdefs in test_autoext.c so that it compiles with X-Git-Tag: version-3.8.0~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3f4964168418a8e0a5b4e5e6ef905d5e56957ca;p=thirdparty%2Fsqlite.git Adjust #ifdefs in test_autoext.c so that it compiles with SQLITE_OMIT_LOAD_EXTENSION. Fix compiler warnings in two other test modules. No changes to the core. FossilOrigin-Name: 89930ea3c3b3bd078f641b2c5203d851083bbf1a --- diff --git a/manifest b/manifest index b54d1a1dae..a87c76f6f4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\sthe\sconfigure\sscript\sto\suse\sthe\slatest\sversion\snumber\s(3.8.0). -D 2013-08-06T18:21:21.097 +C Adjust\s#ifdefs\sin\stest_autoext.c\sso\sthat\sit\scompiles\swith\s\nSQLITE_OMIT_LOAD_EXTENSION.\s\sFix\scompiler\swarnings\sin\stwo\sother\ntest\smodules.\s\sNo\schanges\sto\sthe\score. +D 2013-08-06T18:35:31.726 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -236,13 +236,13 @@ F src/test7.c 126b886b53f0358b92aba9b81d3fcbfbe9a93cd6 F src/test8.c 7ee77ea522ae34aa691dfe407139dec80d4fc039 F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60 F src/test_async.c 21e11293a2f72080eda70e1124e9102044531cd8 -F src/test_autoext.c 32cff3d01cdd3202486e623c3f8103ed04cb57fa +F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12 F src/test_backup.c 3875e899222b651e18b662f86e0e50daa946344e F src/test_btree.c 5b89601dcb42a33ba8b820a6b763cc9cb48bac16 F src/test_config.c 95bb33e9dcaa340a296c0bf0e0ba3d1a1c8004c0 -F src/test_demovfs.c 20a4975127993f4959890016ae9ce5535a880094 +F src/test_demovfs.c 69b2085076654ebc18014cbc6386f04409c959a9 F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc -F src/test_fs.c 8f786bfd0ad48030cf2a06fb1f050e9c60a150d7 +F src/test_fs.c ced436e3d4b8e4681328409b8081051ce614e28f F src/test_func.c 3a8dd37c08ab43b76d38eea2836e34a3897bf170 F src/test_hexio.c abfdecb6fa58c354623978efceb088ca18e379cd F src/test_init.c 3cbad7ce525aec925f8fda2192d576d47f0d478a @@ -1105,7 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P d43dcbc488120aeb7104ab9e6a27f62bb348bf6a -R 3b3e55282f1c280f4b646ca0138070fb +P 52e8ec5e24730efa6d89cbaf1e03bc1d5c59cc05 +R a1467a2c305e4e64db55068e564d786d U drh -Z 4115d1bc46bf087fcf132b66c03b606d +Z 082cd0bd0486defd1efdbdfa0db86156 diff --git a/manifest.uuid b/manifest.uuid index e01b873041..70a2c163ab 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -52e8ec5e24730efa6d89cbaf1e03bc1d5c59cc05 \ No newline at end of file +89930ea3c3b3bd078f641b2c5203d851083bbf1a \ No newline at end of file diff --git a/src/test_autoext.c b/src/test_autoext.c index 4a5a5caa08..a5236d2390 100644 --- a/src/test_autoext.c +++ b/src/test_autoext.c @@ -208,13 +208,13 @@ int Sqlitetest_autoext_Init(Tcl_Interp *interp){ autoExtCubeObjCmd, 0, 0); Tcl_CreateObjCommand(interp, "sqlite3_auto_extension_broken", autoExtBrokenObjCmd, 0, 0); -#endif Tcl_CreateObjCommand(interp, "sqlite3_cancel_auto_extension_sqr", cancelAutoExtSqrObjCmd, 0, 0); Tcl_CreateObjCommand(interp, "sqlite3_cancel_auto_extension_cube", cancelAutoExtCubeObjCmd, 0, 0); Tcl_CreateObjCommand(interp, "sqlite3_cancel_auto_extension_broken", cancelAutoExtBrokenObjCmd, 0, 0); +#endif Tcl_CreateObjCommand(interp, "sqlite3_reset_auto_extension", resetAutoExtObjCmd, 0, 0); return TCL_OK; diff --git a/src/test_demovfs.c b/src/test_demovfs.c index 637627071d..c63b0a8b7a 100644 --- a/src/test_demovfs.c +++ b/src/test_demovfs.c @@ -536,7 +536,7 @@ static int demoFullPathname( if( zPath[0]=='/' ){ zDir[0] = '\0'; }else{ - getcwd(zDir, sizeof(zDir)); + if( getcwd(zDir, sizeof(zDir))==0 ) return SQLITE_IOERR; } zDir[MAXPATHNAME] = '\0'; diff --git a/src/test_fs.c b/src/test_fs.c index 478cad80b1..417c81b49f 100644 --- a/src/test_fs.c +++ b/src/test_fs.c @@ -195,6 +195,7 @@ static int fsColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){ const char *zFile = (const char *)sqlite3_column_text(pCur->pStmt, 1); struct stat sbuf; int fd; + int n; fd = open(zFile, O_RDONLY); if( fd<0 ) return SQLITE_IOERR; @@ -214,8 +215,9 @@ static int fsColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){ pCur->nAlloc = nNew; } - read(fd, pCur->zBuf, sbuf.st_size); + n = (int)read(fd, pCur->zBuf, sbuf.st_size); close(fd); + if( n!=sbuf.st_size ) return SQLITE_ERROR; pCur->nBuf = sbuf.st_size; pCur->zBuf[pCur->nBuf] = '\0';