diff options
author | drh <drh@noemail.net> | 2007-04-01 23:49:51 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-04-01 23:49:51 +0000 |
commit | 61fc595fdd66400031cfcbc8f769ea9d7fb92298 (patch) | |
tree | c4d52be95b6a2361f5eab87ac9990da37792804e /src/os_unix.c | |
parent | 2c547df6cfca33f6cfefbcf3d5ed30d7b9f7da59 (diff) | |
download | sqlite-61fc595fdd66400031cfcbc8f769ea9d7fb92298.tar.gz sqlite-61fc595fdd66400031cfcbc8f769ea9d7fb92298.zip |
Fix some warnings about unused and uninitialized variables. (CVS 3788)
FossilOrigin-Name: 18aec1ddfb08b74f0ef9cf1215eac7af71449db3
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index dedb6b6b9..2fff26852 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2486,6 +2486,7 @@ static int allocateUnixFile( unixFile f; int rc; + memset(&f, 0, sizeof(f)); lockingStyle = sqlite3DetectLockingStyle(zFilename, h); if ( lockingStyle == posixLockingStyle ) { sqlite3OsEnterMutex(); @@ -2505,9 +2506,6 @@ static int allocateUnixFile( unlink(zFilename); } f.dirfd = -1; - f.fullSync = 0; - f.locktype = 0; - f.offset = 0; f.h = h; SET_THREADID(&f); pNew = sqlite3ThreadSafeMalloc( sizeof(unixFile) ); @@ -2574,6 +2572,7 @@ static int allocateUnixFile( unixFile f; int rc; + memset(&f, 0, sizeof(f)); sqlite3OsEnterMutex(); rc = findLockInfo(h, &f.pLock, &f.pOpen); sqlite3OsLeaveMutex(); @@ -2586,9 +2585,6 @@ static int allocateUnixFile( } OSTRACE3("OPEN %-3d %s\n", h, zFilename); f.dirfd = -1; - f.fullSync = 0; - f.locktype = 0; - f.offset = 0; f.h = h; SET_THREADID(&f); pNew = sqlite3ThreadSafeMalloc( sizeof(unixFile) ); |