1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

More strict aliasing fixes. The single source file library now runs

successfully with -fstrict-alias. (CVS 3725)

FossilOrigin-Name: c8a8a189a82500aab501e9949f5b197c0b80b3a9
This commit is contained in:
drh
2007-03-27 13:36:37 +00:00
parent e2330c8608
commit cf64372910
10 changed files with 93 additions and 75 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.282 2007/03/26 22:05:01 drh Exp $
** $Id: expr.c,v 1.283 2007/03/27 13:36:37 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -404,7 +404,7 @@ void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr){
pExpr->iTable = ++pParse->nVar;
if( pParse->nVarExpr>=pParse->nVarExprAlloc-1 ){
pParse->nVarExprAlloc += pParse->nVarExprAlloc + 10;
sqliteReallocOrFree(&pParse->apVarExpr,
pParse->apVarExpr = sqliteReallocOrFree(pParse->apVarExpr,
pParse->nVarExprAlloc*sizeof(pParse->apVarExpr[0]) );
}
if( !sqlite3MallocFailed() ){
@@ -2237,10 +2237,14 @@ int sqlite3ExprCompare(Expr *pA, Expr *pB){
*/
static int addAggInfoColumn(AggInfo *pInfo){
int i;
i = sqlite3ArrayAllocate(&pInfo->aCol, sizeof(pInfo->aCol[0]), 3);
if( i<0 ){
return -1;
}
pInfo->aCol = sqlite3ArrayAllocate(
pInfo->aCol,
sizeof(pInfo->aCol[0]),
3,
&pInfo->nColumn,
&pInfo->nColumnAlloc,
&i
);
return i;
}
@@ -2250,10 +2254,14 @@ static int addAggInfoColumn(AggInfo *pInfo){
*/
static int addAggInfoFunc(AggInfo *pInfo){
int i;
i = sqlite3ArrayAllocate(&pInfo->aFunc, sizeof(pInfo->aFunc[0]), 2);
if( i<0 ){
return -1;
}
pInfo->aFunc = sqlite3ArrayAllocate(
pInfo->aFunc,
sizeof(pInfo->aFunc[0]),
3,
&pInfo->nFunc,
&pInfo->nFuncAlloc,
&i
);
return i;
}