1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Fix compiler warning found with gcc -Wextra. (CVS 6614)

FossilOrigin-Name: 93bdbc5e2f9771a30358cde03f0d3cb708d73d48
This commit is contained in:
drh
2009-05-06 19:03:13 +00:00
parent 60a4b53823
commit b2f9efc3f0
5 changed files with 17 additions and 20 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.547 2009/05/06 18:57:10 shane Exp $
** $Id: main.c,v 1.548 2009/05/06 19:03:14 drh Exp $
*/
#include "sqliteInt.h"
@@ -768,7 +768,7 @@ const char *sqlite3ErrStr(int rc){
/* SQLITE_NOTADB */ "file is encrypted or is not a database",
};
rc &= 0xff;
if( ALWAYS(rc>=0) && rc<sizeof(aMsg)/sizeof(aMsg[0]) && aMsg[rc]!=0 ){
if( ALWAYS(rc>=0) && rc<(int)(sizeof(aMsg)/sizeof(aMsg[0])) && aMsg[rc]!=0 ){
return aMsg[rc];
}else{
return "unknown error";