aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-03-27 13:36:37 +0000
committerdrh <drh@noemail.net>2007-03-27 13:36:37 +0000
commitcf64372910664bad20431eaef06cce28b1c03225 (patch)
treebf53a748ceb5bd32328a85ba3aa5c2437b1ee673 /src/expr.c
parente2330c8608e4f60e969e35cca73228700025fc3d (diff)
downloadsqlite-cf64372910664bad20431eaef06cce28b1c03225.tar.gz
sqlite-cf64372910664bad20431eaef06cce28b1c03225.zip
More strict aliasing fixes. The single source file library now runs
successfully with -fstrict-alias. (CVS 3725) FossilOrigin-Name: c8a8a189a82500aab501e9949f5b197c0b80b3a9
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/expr.c b/src/expr.c
index a9ae1e819..934f98840 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -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;
}