Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the compiler warning #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions unqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -4892,7 +4892,7 @@ int unqlite_value_string_format(unqlite_value *pVal, const char *zFormat,...)
va_start(ap, zFormat);
rc = SyBlobFormatAp(&pVal->sBlob, zFormat, ap);
va_end(ap);
return UNQLITE_OK;
return rc;
}
/*
* [CAPIREF: unqlite_value_reset_string_cursor()]
Expand Down Expand Up @@ -8561,7 +8561,7 @@ JX9_PRIVATE int jx9_value_string_format(jx9_value *pVal, const char *zFormat, ..
va_start(ap, zFormat);
rc = SyBlobFormatAp(&pVal->sBlob, zFormat, ap);
va_end(ap);
return JX9_OK;
return rc;
}
/*
* [CAPIREF: jx9_value_reset_string_cursor()]
Expand Down Expand Up @@ -12251,7 +12251,6 @@ JX9_PRIVATE sxi32 jx9InputFormat(
jx9_value *pArg; /* Current processed argument */
jx9_int64 iVal;
int precision; /* Precision of the current field */
char *zExtra;
int c, rc, n;
int length; /* Length of the field */
int prefix;
Expand Down Expand Up @@ -12360,7 +12359,6 @@ JX9_PRIVATE sxi32 jx9InputFormat(
}
zBuf = zWorker; /* Point to the working buffer */
length = 0;
zExtra = 0;
/*
** At this point, variables are initialized as follows:
**
Expand Down Expand Up @@ -18410,9 +18408,7 @@ static sxi32 jx9CompileBreak(jx9_gen_state *pGen)
{
GenBlock *pLoop; /* Target loop */
sxi32 iLevel; /* How many nesting loop to skip */
sxu32 nLine;
sxi32 rc;
nLine = pGen->pIn->nLine;
iLevel = 0;
/* Jump the 'break' keyword */
pGen->pIn++;
Expand Down Expand Up @@ -19873,13 +19869,12 @@ static sxi32 GenStateProcessArgValue(jx9_gen_state *pGen, jx9_vm_func_arg *pArg,
static sxi32 GenStateCollectFuncArgs(jx9_vm_func *pFunc, jx9_gen_state *pGen, SyToken *pEnd)
{
jx9_vm_func_arg sArg; /* Current processed argument */
SyToken *pCur, *pIn; /* Token stream */
SyToken *pIn; /* Token stream */
SyBlob sSig; /* Function signature */
char *zDup; /* Copy of argument name */
sxi32 rc;

pIn = pGen->pIn;
pCur = 0;
SyBlobInit(&sSig, &pGen->pVm->sAllocator);
/* Process arguments one after one */
for(;;){
Expand Down Expand Up @@ -29173,7 +29168,6 @@ static const SyFmtInfo aFmt[] = {
char prefix; /* Prefix character."+" or "-" or " " or '\0'.*/
sxu8 errorflag = 0; /* True if an error is encountered */
sxu8 xtype; /* Conversion paradigm */
char *zExtra;
static char spaces[] = " ";
#define etSPACESIZE ((int)sizeof(spaces)-1)
#ifndef SX_OMIT_FLOATINGPOINT
Expand Down Expand Up @@ -29278,7 +29272,6 @@ static const SyFmtInfo aFmt[] = {
break;
}
}
zExtra = 0;

/*
** At this point, variables are initialized as follows:
Expand Down Expand Up @@ -46259,7 +46252,7 @@ static int vm_builtin_get_defined_constants(jx9_context *pCtx, int nArg, jx9_val
*/
JX9_PRIVATE sxu32 jx9VmRandomNum(jx9_vm *pVm)
{
sxu32 iNum;
sxu32 iNum = 0;
SyRandomness(&pVm->sPrng, (void *)&iNum, sizeof(sxu32));
return iNum;
}
Expand Down Expand Up @@ -57926,7 +57919,7 @@ UNQLITE_PRIVATE void unqlitePagerRandomString(Pager *pPager,char *zBuf,sxu32 nLe
*/
UNQLITE_PRIVATE sxu32 unqlitePagerRandomNum(Pager *pPager)
{
sxu32 iNum;
sxu32 iNum = 0;
SyRandomness(&pPager->sPrng,(void *)&iNum,sizeof(iNum));
return iNum;
}
Expand Down