mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix problems with the WatCom C compiler: Arrays must contain at least one
element. sqlite3FreeX declared properly. Don't allow run-time expression (the SQLITE_UTF16NATIVE macro) in an array initializer. (CVS 1640) FossilOrigin-Name: fbfc3c95a8abf25bb9e2b44cfeb7186c5b0591d7
This commit is contained in:
19
src/pragma.c
19
src/pragma.c
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to implement the PRAGMA command.
|
||||
**
|
||||
** $Id: pragma.c,v 1.49 2004/06/19 14:49:12 drh Exp $
|
||||
** $Id: pragma.c,v 1.50 2004/06/19 15:22:56 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -767,17 +767,18 @@ void sqlite3Pragma(Parse *pParse, Token *pLeft, Token *pRight, int minusFlag){
|
||||
char *zName;
|
||||
u8 enc;
|
||||
} encnames[] = {
|
||||
{ "UTF-8", SQLITE_UTF8 },
|
||||
{ "UTF-16le", SQLITE_UTF16LE },
|
||||
{ "UTF-16be", SQLITE_UTF16BE },
|
||||
{ "UTF-16", SQLITE_UTF16NATIVE },
|
||||
{ "UTF8", SQLITE_UTF8 },
|
||||
{ "UTF16le", SQLITE_UTF16LE },
|
||||
{ "UTF16be", SQLITE_UTF16BE },
|
||||
{ "UTF16", SQLITE_UTF16NATIVE },
|
||||
{ "UTF-8", SQLITE_UTF8 },
|
||||
{ "UTF8", SQLITE_UTF8 },
|
||||
{ "UTF-16le", SQLITE_UTF16LE },
|
||||
{ "UTF16le", SQLITE_UTF16LE },
|
||||
{ "UTF-16be", SQLITE_UTF16BE },
|
||||
{ "UTF16be", SQLITE_UTF16BE },
|
||||
{ "UTF-16", 0 /* Filled in at run-time */ },
|
||||
{ "UTF16", 0 /* Filled in at run-time */ },
|
||||
{ 0, 0 }
|
||||
};
|
||||
struct EncName *pEnc;
|
||||
encnames[6].enc = encnames[7].enc = SQLITE_UTF16NATIVE;
|
||||
if( pRight->z==pLeft->z ){ /* "PRAGMA encoding" */
|
||||
if( SQLITE_OK!=sqlite3ReadSchema(pParse->db, &pParse->zErrMsg) ){
|
||||
pParse->nErr++;
|
||||
|
||||
Reference in New Issue
Block a user