/ Check-in [91831ff2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:The code is correct as it contains an assert(3) in the "default" switch case, but GCC 4.3 is not able to detect this and instead complains with "warning: 'amode' may be used uninitialized in this function". Hence, although the assert(3) already protects the code here, get rid of this compiler warning by doing a simple initialization of the "amode" variable. (CVS 4436)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:91831ff2922666b39d8f4ba448982c6763030633
User & Date: rse 2007-09-20 08:38:15
Context
2007-09-20
10:02
Fixes for uninitialized variables. Tickets #2658 and #2659. (CVS 4437) check-in: 27fe1288 user: drh tags: trunk
08:38
The code is correct as it contains an assert(3) in the "default" switch case, but GCC 4.3 is not able to detect this and instead complains with "warning: 'amode' may be used uninitialized in this function". Hence, although the assert(3) already protects the code here, get rid of this compiler warning by doing a simple initialization of the "amode" variable. (CVS 4436) check-in: 91831ff2 user: rse tags: trunk
2007-09-18
16:53
Add disabled test cases for ticket #2652. We will enable these test cases after #2652 is fixed. The fix will be difficult and will probably take a while. On the other hand, correlated aggregate queries have never worked in SQLite and the problem is just now coming to light, so it is probably not a pressing issue. (CVS 4435) check-in: 5c41619e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
**     SQLITE_ACCESS_EXISTS: Return 1 if the file exists
**     SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable.
**     SQLITE_ACCESS_READONLY: Return 1 if the file is readable.
**
** Otherwise return 0.
*/
static int unixAccess(sqlite3_vfs *pVfs, const char *zPath, int flags){
  int amode;
  switch( flags ){
    case SQLITE_ACCESS_EXISTS:
      amode = F_OK;
      break;
    case SQLITE_ACCESS_READWRITE:
      amode = W_OK|R_OK;
      break;







|







2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
**     SQLITE_ACCESS_EXISTS: Return 1 if the file exists
**     SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable.
**     SQLITE_ACCESS_READONLY: Return 1 if the file is readable.
**
** Otherwise return 0.
*/
static int unixAccess(sqlite3_vfs *pVfs, const char *zPath, int flags){
  int amode = 0;
  switch( flags ){
    case SQLITE_ACCESS_EXISTS:
      amode = F_OK;
      break;
    case SQLITE_ACCESS_READWRITE:
      amode = W_OK|R_OK;
      break;