aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris <christopherwuy@gmail.com>2020-08-07 18:10:20 +0800
committerGitHub <noreply@github.com>2020-08-07 13:10:20 +0300
commitb78514101907978f7776df1b5d95dac8a7798129 (patch)
treed4cfa72e1f6c9de5ea4b6c8aafb1c69cf307e32e
parent1b3984634f0ac427443b30fccf58d8140e07af96 (diff)
downloadone-true-awk-b78514101907978f7776df1b5d95dac8a7798129.tar.gz
printf: The argument p shall be a pointer to void. (#93)
-rw-r--r--run.c4
-rw-r--r--tran.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/run.c b/run.c
index ae17756..01b4597 100644
--- a/run.c
+++ b/run.c
@@ -119,7 +119,7 @@ int adjbuf(char **pbuf, int *psiz, int minlen, int quantum, char **pbptr,
if (rminlen)
minlen += quantum - rminlen;
tbuf = realloc(*pbuf, minlen);
- DPRINTF("adjbuf %s: %d %d (pbuf=%p, tbuf=%p)\n", whatrtn, *psiz, minlen, *pbuf, tbuf);
+ DPRINTF("adjbuf %s: %d %d (pbuf=%p, tbuf=%p)\n", whatrtn, *psiz, minlen, (void*)*pbuf, (void*)tbuf);
if (tbuf == NULL) {
if (whatrtn)
FATAL("out of memory in %s", whatrtn);
@@ -1843,7 +1843,7 @@ const char *filename(FILE *fp)
Cell *x;
size_t i;
bool stat;
-
+
x = execute(a[0]);
getsval(x);
stat = true;
diff --git a/tran.c b/tran.c
index 2617b85..ee5facb 100644
--- a/tran.c
+++ b/tran.c
@@ -361,7 +361,7 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */
fldno = atoi(vp->nval);
if (fldno > *NF)
newfld(fldno);
- DPRINTF("setting field %d to %s (%p)\n", fldno, s, s);
+ DPRINTF("setting field %d to %s (%p)\n", fldno, s, (const void*)s);
} else if (isrec(vp)) {
donefld = false; /* mark $1... invalid */
donerec = true;
@@ -378,7 +378,7 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */
vp->fmt = NULL;
setfree(vp);
DPRINTF("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n",
- (void*)vp, NN(vp->nval), t, t, vp->tval, donerec, donefld);
+ (void*)vp, NN(vp->nval), t, (void*)t, vp->tval, donerec, donefld);
vp->sval = t;
if (&vp->fval == NF) {
donerec = false; /* mark $0 invalid */
@@ -492,7 +492,7 @@ static char *get_str_val(Cell *vp, char **fmt) /* get string val of a Cel
}
done:
DPRINTF("getsval %p: %s = \"%s (%p)\", t=%o\n",
- (void*)vp, NN(vp->nval), vp->sval, vp->sval, vp->tval);
+ (void*)vp, NN(vp->nval), vp->sval, (void*)vp->sval, vp->tval);
return(vp->sval);
}