X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/55f65ae2d3baf60396d3359db952460939de03ca..167e542b:/uip/mhlsbr.c?ds=inline diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 82e65d77..0788d1ef 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -877,6 +877,8 @@ process (char *folder, char *fname, int ofilen, int ofilec) struct mcomp *c1; struct stat st; struct arglist *ap; + /* volatile to prevent "might be clobbered" warning from gcc: */ + char *volatile fname2 = fname ? fname : "(stdin)"; switch (setjmp (env)) { case OK: @@ -888,7 +890,6 @@ process (char *folder, char *fname, int ofilen, int ofilec) return; } } else { - fname = "(stdin)"; fp = stdin; } if (fstat(fileno(fp), &st) == 0) { @@ -896,7 +897,7 @@ process (char *folder, char *fname, int ofilen, int ofilec) } else { filesize = 0; } - cp = folder ? concat (folder, ":", fname, NULL) : getcpy (fname); + cp = folder ? concat (folder, ":", fname2, NULL) : getcpy (fname2); if (ontty != PITTY) SIGNAL (SIGINT, intrser); mhlfile (fp, cp, ofilen, ofilec); /* FALL THROUGH! */ @@ -1179,7 +1180,7 @@ mcomp_format (struct mcomp *c1, struct mcomp *c2) if ((p = (struct pqpair *) calloc ((size_t) 1, sizeof(*p))) == NULL) adios (NULL, "unable to allocate pqpair memory"); - if ((mp = getm (cp, NULL, 0, AD_NAME, error)) == NULL) { + if ((mp = getm (cp, NULL, 0, error, sizeof(error))) == NULL) { p->pq_text = getcpy (cp); p->pq_error = getcpy (error); } else { @@ -1851,7 +1852,6 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp, * buffers that we have duplicated from the parent. */ _exit(0); - break; case -1: adios(NULL, "Unable to fork for filter writer process"); break;