Be able to compile with -Wwrite-strings
This commit is contained in:
parent
dff0a5c968
commit
96fe73a39f
@ -3855,8 +3855,8 @@ struct ph7_fmt_info
|
||||
sxu8 base; /* The base for radix conversion */
|
||||
int flags; /* One or more of PH7_FMT_FLAG_ constants below */
|
||||
sxu8 type; /* Conversion paradigm */
|
||||
char *charset; /* The character set for conversion */
|
||||
char *prefix; /* Prefix on non-zero values in alt format */
|
||||
const char *charset; /* The character set for conversion */
|
||||
const char *prefix; /* Prefix on non-zero values in alt format */
|
||||
};
|
||||
#ifndef PH7_OMIT_FLOATING_POINT
|
||||
/*
|
||||
@ -4160,7 +4160,7 @@ PH7_PRIVATE sxi32 PH7_InputFormat(
|
||||
}
|
||||
zBuf = &zWorker[PH7_FMT_BUFSIZ-1];
|
||||
{
|
||||
register char *cset; /* Use registers for speed */
|
||||
register const char *cset; /* Use registers for speed */
|
||||
register int base;
|
||||
cset = pInfo->charset;
|
||||
base = pInfo->base;
|
||||
@ -4175,7 +4175,8 @@ PH7_PRIVATE sxi32 PH7_InputFormat(
|
||||
}
|
||||
if( prefix ) *(--zBuf) = (char)prefix; /* Add sign */
|
||||
if( flag_alternateform && pInfo->prefix ){ /* Add "0" or "0x" */
|
||||
char *pre, x;
|
||||
const char *pre;
|
||||
char x;
|
||||
pre = pInfo->prefix;
|
||||
if( *zBuf!=pre[0] ){
|
||||
for(pre=pInfo->prefix; (x=(*pre))!=0; pre++) *(--zBuf) = x;
|
||||
|
9
lib.c
9
lib.c
@ -2550,8 +2550,8 @@ struct SyFmtInfo
|
||||
sxu8 base; /* The base for radix conversion */
|
||||
int flags; /* One or more of SXFLAG_ constants below */
|
||||
sxu8 type; /* Conversion paradigm */
|
||||
char *charset; /* The character set for conversion */
|
||||
char *prefix; /* Prefix on non-zero values in alt format */
|
||||
const char *charset; /* The character set for conversion */
|
||||
const char *prefix; /* Prefix on non-zero values in alt format */
|
||||
};
|
||||
typedef struct SyFmtConsumer SyFmtConsumer;
|
||||
struct SyFmtConsumer
|
||||
@ -2815,7 +2815,7 @@ static const SyFmtInfo aFmt[] = {
|
||||
}
|
||||
bufpt = &buf[SXFMT_BUFSIZ-1];
|
||||
{
|
||||
register char *cset; /* Use registers for speed */
|
||||
register const char *cset; /* Use registers for speed */
|
||||
register int base;
|
||||
cset = infop->charset;
|
||||
base = infop->base;
|
||||
@ -2830,7 +2830,8 @@ static const SyFmtInfo aFmt[] = {
|
||||
}
|
||||
if( prefix ) *(--bufpt) = prefix; /* Add sign */
|
||||
if( flag_alternateform && infop->prefix ){ /* Add "0" or "0x" */
|
||||
char *pre, x;
|
||||
const char *pre;
|
||||
char x;
|
||||
pre = infop->prefix;
|
||||
if( *bufpt!=pre[0] ){
|
||||
for(pre=infop->prefix; (x=(*pre))!=0; pre++) *(--bufpt) = x;
|
||||
|
2
vfs.c
2
vfs.c
@ -4378,7 +4378,7 @@ static int PH7_builtin_fputcsv(ph7_context *pCtx,int nArg,ph7_value **apArg)
|
||||
const ph7_io_stream *pStream;
|
||||
struct csv_data sCsv;
|
||||
io_private *pDev;
|
||||
char *zEol;
|
||||
const char *zEol;
|
||||
int eolen;
|
||||
if( nArg < 2 || !ph7_value_is_resource(apArg[0]) || !ph7_value_is_array(apArg[1]) ){
|
||||
/* Missing/Invalid arguments,return FALSE */
|
||||
|
4
vm.c
4
vm.c
@ -2197,7 +2197,7 @@ PH7_PRIVATE sxi32 PH7_VmThrowError(
|
||||
{
|
||||
SyBlob *pWorker = &pVm->sWorker;
|
||||
SyString *pFile;
|
||||
char *zErr;
|
||||
const char *zErr;
|
||||
sxi32 rc;
|
||||
if( !pVm->bErrReport ){
|
||||
/* Don't bother reporting errors */
|
||||
@ -2246,7 +2246,7 @@ static sxi32 VmThrowErrorAp(
|
||||
{
|
||||
SyBlob *pWorker = &pVm->sWorker;
|
||||
SyString *pFile;
|
||||
char *zErr;
|
||||
const char *zErr;
|
||||
sxi32 rc;
|
||||
if( !pVm->bErrReport ){
|
||||
/* Don't bother reporting errors */
|
||||
|
Loading…
Reference in New Issue
Block a user