onetrueawk / awk

One true awk
Other
1.98k stars 160 forks source link

printf: The argument p shall be a pointer to void. #93

Closed atlas-comstock closed 4 years ago

arnoldrobbins commented 4 years ago

Thanks for this. As stated in the README.md, we request that PRs be into the staging branch instead of into master. Please change it.

Also, there are more instances of %p in the code than just these three. Did you review all of them? If not, would you mind doing so? We may as well be thorough if we're going to make such a change. Thank you!

atlas-comstock commented 4 years ago

@arnoldrobbins Sure. Thanks.

atlas-comstock commented 4 years ago
tran.c
236:            DPRINTF("setsymtab found %p: n=%s s=\"%s\" f=%g t=%o\n",
237-                    (void*)p, NN(p->nval), NN(p->sval), p->fval, p->tval);
--
255:    DPRINTF("setsymtab set %p: n=%s s=\"%s\" f=%g t=%o\n",
256-            (void*)p, p->nval, p->sval, p->fval, p->tval);
--
335:    DPRINTF("setfval %p: %s = %g, t=%o\n", (void*)vp, NN(vp->nval), f, vp->tval);
336-    return vp->fval = f;
--
345:    WARNING("funny variable %p: n=%s s=\"%s\" f=%g t=%o",
346-            (void *)vp, vp->nval, vp->sval, vp->fval, vp->tval);
--
355:    DPRINTF("starting setsval %p: %s = \"%s\", t=%o, r,f=%d,%d\n",
356-            (void*)vp, NN(vp->nval), s, vp->tval, donerec, donefld);
--
364:            DPRINTF("setting field %d to %s (%p)\n", fldno, s, (const void*)s);
365-    } else if (isrec(vp)) {
--
380:    DPRINTF("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n",
381-            (void*)vp, NN(vp->nval), t, (void*)t, vp->tval, donerec, donefld);
--
406:    DPRINTF("getfval %p: %s = %g, t=%o\n",
407-            (void*)vp, NN(vp->nval), vp->fval, vp->tval);
--
494:    DPRINTF("getsval %p: %s = \"%s (%p)\", t=%o\n",
495-            (void*)vp, NN(vp->nval), vp->sval, (void*)vp->sval, vp->tval);

lib.c
558:    DPRINTF("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]);
559-
--
565:    DPRINTF("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]);
566-    DPRINTF("recbld = |%s|\n", record);

run.c
122:            DPRINTF("adjbuf %s: %d %d (pbuf=%p, tbuf=%p)\n", whatrtn, *psiz, minlen, (void*)*pbuf, (void*)tbuf);
123-            if (tbuf == NULL) {

@arnoldrobbins Done, plz check