Skip to content

Commit

Permalink
Patch sqlite3.c to avoid CGo compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSLevy committed Jun 7, 2020
1 parent 748761b commit 6c1d4ad
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions c/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -128974,9 +128974,9 @@ SQLITE_PRIVATE Select *sqlite3SelectNew(
u32 selFlags, /* Flag parameters, such as SF_Distinct */
Expr *pLimit /* LIMIT value. NULL means not used */
){
Select *pNew;
Select *pNew, *pAllocated;
Select standin;
pNew = sqlite3DbMallocRawNN(pParse->db, sizeof(*pNew) );
pAllocated = pNew = sqlite3DbMallocRawNN(pParse->db, sizeof(*pNew) );
if( pNew==0 ){
assert( pParse->db->mallocFailed );
pNew = &standin;
Expand Down Expand Up @@ -129010,12 +129010,11 @@ SQLITE_PRIVATE Select *sqlite3SelectNew(
#endif
if( pParse->db->mallocFailed ) {
clearSelect(pParse->db, pNew, pNew!=&standin);
pNew = 0;
pAllocated = 0;
}else{
assert( pNew->pSrc!=0 || pParse->nErr>0 );
}
assert( pNew!=&standin );
return pNew;
return pAllocated;
}


Expand Down

0 comments on commit 6c1d4ad

Please sign in to comment.