Skip to content

Commit

Permalink
Fixed some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Joakim Wennergren committed Dec 16, 2017
1 parent 1a7d872 commit 5cb10e3
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CsvQuery/CsharpSqlite/build_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3649,7 +3649,7 @@ static SrcList sqlite3SrcListEnlarge(
if ( pSrc.nSrc + nExtra > pSrc.nAlloc )
{
int nAlloc = pSrc.nSrc + nExtra;
int nGot;
// int nGot;
// sqlite3DbRealloc(db, pSrc,
// sizeof(*pSrc) + (nAlloc-1)*sizeof(pSrc.a[0]) );
pSrc.nAlloc = (i16)nAlloc;
Expand Down
2 changes: 1 addition & 1 deletion CsvQuery/CsharpSqlite/func_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ sqlite3_value[] argv
int nStr; /* Size of zStr */
int nOut; /* Maximum size of zOut */
//int loopLimit; /* Last zStr[] that might match zPattern[] */
int i, j = 0; /* Loop counters */
int j = 0; /* Loop counters */

Debug.Assert( argc == 3 );
UNUSED_PARAMETER( argc );
Expand Down
2 changes: 1 addition & 1 deletion CsvQuery/CsharpSqlite/malloc_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static int sqlite3MallocInit()
if ( sqlite3GlobalConfig.pScratch != null && sqlite3GlobalConfig.szScratch >= 100
&& sqlite3GlobalConfig.nScratch >= 0 )
{
int i;
//int i;
sqlite3GlobalConfig.szScratch = ROUNDDOWN8( sqlite3GlobalConfig.szScratch - 4 );
//mem0.aScratchFree = (u32)&((char)sqlite3GlobalConfig.pScratch)
// [sqlite3GlobalConfig.szScratch*sqlite3GlobalConfig.nScratch];
Expand Down
30 changes: 15 additions & 15 deletions CsvQuery/CsharpSqlite/os_win_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static int seekWinFile( sqlite3_file id, sqlite3_int64 iOffset )
{
//LONG upperBits; /* Most sig. 32 bits of new offset */
//LONG lowerBits; /* Least sig. 32 bits of new offset */
DWORD dwRet; /* Value returned by SetFilePointer() */
//DWORD dwRet; /* Value returned by SetFilePointer() */
sqlite3_file pFile = id;

//upperBits = (LONG)((iOffset>>32) & 0x7fffffff);
Expand All @@ -853,7 +853,7 @@ static int seekWinFile( sqlite3_file id, sqlite3_int64 iOffset )
id.fs.Seek( iOffset, SeekOrigin.Begin ); // SetFilePointer(pFile.fs.Name, lowerBits, upperBits, FILE_BEGIN);
#endif
}
catch ( Exception e )
catch ( Exception )
{
#if SQLITE_SILVERLIGHT || SQLITE_WINRT
pFile.lastErrno = 1;
Expand Down Expand Up @@ -1048,7 +1048,7 @@ sqlite3_int64 offset /* Offset into the file to begin writing at */
#endif
rc = 1;// Success
}
catch ( IOException e )
catch ( IOException )
{
return SQLITE_READONLY;
}
Expand Down Expand Up @@ -1125,7 +1125,7 @@ static int winTruncate( sqlite3_file id, sqlite3_int64 nByte )
#endif
rc = SQLITE_OK;
}
catch ( IOException e )
catch ( IOException )
{
#if SQLITE_SILVERLIGHT || SQLITE_WINRT
id.lastErrno = 1;
Expand Down Expand Up @@ -1298,7 +1298,7 @@ static int unlockReadLock( sqlite3_file pFile )
{
lockingStrategy.UnlockFile( pFile, SHARED_FIRST, SHARED_SIZE ); // res = UnlockFile(pFile.h, SHARED_FIRST, 0, SHARED_SIZE, 0);
}
catch ( Exception e )
catch ( Exception )
{
res = 0;
}
Expand Down Expand Up @@ -1397,7 +1397,7 @@ static int winLock( sqlite3_file id, int locktype )
lockingStrategy.LockFile( pFile, PENDING_BYTE, 1 );
res = 1;
}
catch ( Exception e )
catch ( Exception )
{
/* Try 3 times to get the pending lock. The pending lock might be
** held by another reader process who will release it momentarily.
Expand Down Expand Up @@ -1455,7 +1455,7 @@ static int winLock( sqlite3_file id, int locktype )
newLocktype = RESERVED_LOCK;
res = 1;
}
catch ( Exception e )
catch ( Exception )
{
res = 0;
#if SQLITE_SILVERLIGHT || SQLITE_WINRT
Expand Down Expand Up @@ -1585,7 +1585,7 @@ static int winCheckReservedLock( sqlite3_file id, ref int pResOut )
lockingStrategy.UnlockFile( pFile, RESERVED_BYTE, 1 );
rc = 1;
}
catch ( IOException e )
catch ( IOException )
{
rc = 0;
}
Expand Down Expand Up @@ -1638,7 +1638,7 @@ static int winUnlock( sqlite3_file id, int locktype )
{
lockingStrategy.UnlockFile( pFile, RESERVED_BYTE, 1 );// UnlockFile(pFile.h, RESERVED_BYTE, 0, 1, 0);
}
catch ( Exception e )
catch ( Exception )
{
}
}
Expand All @@ -1652,7 +1652,7 @@ static int winUnlock( sqlite3_file id, int locktype )
{
lockingStrategy.UnlockFile( pFile, PENDING_BYTE, 1 );// UnlockFile(pFile.h, PENDING_BYTE, 0, 1, 0);
}
catch ( Exception e )
catch ( Exception )
{
}
}
Expand Down Expand Up @@ -2952,7 +2952,7 @@ int syncDir /* Not used on win32 */
#endif
rc = SQLITE_OK;
}
catch ( IOException e )
catch ( IOException )
{
rc = SQLITE_IOERR;
#if SQLITE_WINRT
Expand Down Expand Up @@ -2988,7 +2988,7 @@ int syncDir /* Not used on win32 */
File.Delete( zConverted );
rc = SQLITE_OK;
}
catch ( IOException e )
catch ( IOException )
{
rc = SQLITE_IOERR;
Thread.Sleep( 100 );
Expand Down Expand Up @@ -3102,7 +3102,7 @@ static int winAccess(
File.Delete( name );
attr = FileAttributes.Normal;
}
catch ( IOException e )
catch ( IOException )
{
attr = FileAttributes.ReadOnly;
}
Expand All @@ -3120,7 +3120,7 @@ static int winAccess(
#endif
#endif
//}
catch ( IOException e )
catch ( IOException )
{
winLogError(SQLITE_IOERR_ACCESS, "winAccess", zFilename);
}
Expand Down Expand Up @@ -3785,7 +3785,7 @@ public static bool FileExists(string path)
Task<StorageFile> fileTask = StorageFile.GetFileFromPathAsync(path).AsTask<StorageFile>();
fileTask.Wait();
}
catch (Exception e)
catch (Exception)
{
AggregateException ae = e as AggregateException;
if (ae != null && ae.InnerException is FileNotFoundException)
Expand Down
4 changes: 2 additions & 2 deletions CsvQuery/CsharpSqlite/pager_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4872,7 +4872,7 @@ static int sqlite3PagerOpen(
dxReiniter xReinit /* Function to reinitialize pages */
)
{
u8 pPtr;
//u8 pPtr;
Pager pPager = null; /* Pager object to allocate and return */
int rc = SQLITE_OK; /* Return code */
u8 tempFile = 0; /* True for temp files (incl. in-memory files) */ // Needs to be u8 for later tests
Expand All @@ -4886,7 +4886,7 @@ dxReiniter xReinit /* Function to reinitialize pages */
int pcacheSize = sqlite3PcacheSize(); /* Bytes to allocate for PCache */
u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE; /* Default page size */
string zUri = null; /* URI args to copy */
int nUri = 0; /* Number of bytes of URI args at *zUri */
//int nUri = 0; /* Number of bytes of URI args at *zUri */

/* Figure out how much space is required for each journal file-handle
** (there are two of them, the main journal and the sub-journal). This
Expand Down
2 changes: 1 addition & 1 deletion CsvQuery/CsharpSqlite/pcache1_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ static sqlite3_pcache pcache1Create( int szPage, bool bPurgeable )
{
PCache1 pCache; /* The newly created page cache */
PGroup pGroup; /* The group the new page cache will belong to */
int sz; /* Bytes of memory required to allocate the new cache */
//int sz; /* Bytes of memory required to allocate the new cache */

/*
** The seperateCache variable is true if each PCache has its own private
Expand Down
2 changes: 1 addition & 1 deletion CsvQuery/CsharpSqlite/pragma_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ static void sqlite3Pragma(
*/
if ( zLeft.Equals( "encoding", StringComparison.OrdinalIgnoreCase ) )
{
int iEnc;
//int iEnc;
if ( null == zRight )
{ /* "PRAGMA encoding" */
if ( sqlite3ReadSchema( pParse ) != 0 )
Expand Down
4 changes: 2 additions & 2 deletions CsvQuery/CsharpSqlite/vdbeaux_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ static void sqlite3VdbeChangeP4( Vdbe p, int addr, union_p4 _p4, int n )
else if ( n == P4_KEYINFO )
{
KeyInfo pKeyInfo;
int nByte;
//int nByte;

//int nField = _p4.pKeyInfo.nField;
//nByte = sizeof(*pKeyInfo) + (nField-1)*sizeof(pKeyInfo.aColl[0]) + nField;
Expand Down Expand Up @@ -3191,7 +3191,7 @@ static void sqlite3VdbeDeleteAuxData( VdbeFunc pVdbeFunc, int mask )
static void sqlite3VdbeDeleteObject( sqlite3 db, ref Vdbe p )
{
SubProgram pSub, pNext;
int i;
//int i;
Debug.Assert( p.db == null || p.db == db );
releaseMemArray( p.aVar, p.nVar );
releaseMemArray( p.aColName, p.nResColumn, COLNAME_N );
Expand Down

0 comments on commit 5cb10e3

Please sign in to comment.